Things compile and the test-suite passes. Still need to hook up
gio.symbols and docs. There are still a bunch of TODOs left in the
sources that needs to be addressed.
Signed-off-by: David Zeuthen <davidz@redhat.com>
- used in some places as a move-along-as-we-go pointer
- used in other places as a pointer to the fixed base of an array
Switch all users to the first style to avoid a crasher.
socket_strerror() was assuming all "strerror" messages are shorter
than 128 bytes, which is certainly true on Linux, but apparently not
on Windows.
https://bugzilla.gnome.org/show_bug.cgi?id=615494
The messages array was not reallocated correctly because it was using
malloc instead of realloc. Also, if the user requested messages but
none were received we would segfault. Rewrite the code to fix this
and, for better readability, use GPtrArray instead of rolling our own.
Also make the docs mention that the user need to free the returned
GSocketControlMessage objects using g_object_unref().
Clarify that *messages may be set to %NULL if there are no messages
(this will save pointless allocs of arrays).
Finally, the Win32 version didn't set messages to the expected value.
https://bugzilla.gnome.org/show_bug.cgi?id=616877
Signed-off-by: David Zeuthen <davidz@redhat.com>
- modify serialiser validation function to enforce utf8 encoding
- add documentation to g_variant_new_string(), g_variant_get_string(),
g_variant_dup_string()
- add 2 new test cases to check that it works
It would be good, error reporting-wise, to be able to signal which
function should be used instead of a deprecated one. GCC 4.5 added an
optional "message" payload to the deprecated attribute, so that:
void f1 (void) __attribute__((deprecated("Use f2 instead")));
Will expand to:
warning: f1 is deprecated: Use f2 instead
Instead of just printing:
warning: f1 is deprecated
Since we already have a G_GNUC_DEPRECATED macro we should provide a
G_GNUC_DEPRECATED_FOR macro defined as:
G_GNUC_DEPRECATED_FOR(bar)
Which would expand the deprecation message to "Use bar instead"
automatically. The deprecation message should probably be similar
to what we use in gtk-doc to match up with the documentation.
https://bugzilla.gnome.org/show_bug.cgi?id=614965