If a GInputStream does not provide a read_async() implementation, but
does implement GPollableInputStream, then instead of doing
read-synchronously-in-a-thread, just use
g_pollable_input_stream_read_nonblocking() and
g_pollable_input_stream_create_source() to implement an async read in
the same thread. Similarly for GOutputStream.
Remove a bunch of existing read_async()/write_async() implementations
that are basically equivalent to the new fallback method.
https://bugzilla.gnome.org/show_bug.cgi?id=673997
Implement GPollableInputStream in GMemoryInputStream and
GConverterInputStream, and likewise implement GPollableOutputStream in
the corresponding output streams.
https://bugzilla.gnome.org/show_bug.cgi?id=673997
Move g_pollable_source_new() here from gpollableinputstream.c, add
g_pollable_source_new_full(), and add some new methods to do either
blocking or nonblocking reads depending on a boolean argument.
https://bugzilla.gnome.org/show_bug.cgi?id=673997
Make g_pollable_input_stream_read() and
g_pollable_output_stream_write() look a little bit more like the
non-pollable versions in terms of error handling, etc. Also, use the
read_fn and write_fn virtual methods directly rather than calling
g_input_stream_read()/g_output_stream_write(), to avoid problems with
re-entrancy involving the "pending" flag.
Also belatedly add single-include guards to the header files.
https://bugzilla.gnome.org/show_bug.cgi?id=673997
The loop was using a GConverterResult variable where it meant to use a
gssize, and since GConverterResult was ending up as an unsigned type,
this meant the (res < 0) check always failed.
Resources are always little endian, so the gvdb is byteswapped. When looking
up the value, it would return a new byteswapped variant, making the data
returned from do_lookup() invalid once that variant is unref'd. Since
byteswapping doesn't matter for the "ay" data anyway, just use
gvdb_table_get_raw_value() instead and only byteswap the length and flag
values.
https://bugzilla.gnome.org/show_bug.cgi?id=673409
1) The test was using GCond incorrectly (it always needs a
state variable)
2) The state assertion was racing with the thread; just delete it.
All we're really trying to test here is that the invoke runs by the
time the thread is gone, and the function has an assertion that
it runs in the correct thread.
https://bugzilla.gnome.org/show_bug.cgi?id=674213
When blocking a source that has child sources, we need to consider the
children blocked as well. Otherwise they will still trigger repeatedly
in an inner loop started from the parent source's callback.
https://bugzilla.gnome.org/show_bug.cgi?id=669260
The parsing test needs to make some assumption about the locale
representation of the string to be parsed, so we need to explicitly
override the locale here.
* Add resolver functions for looking up DNS records of
various types. Currently implemented: MX, TXT, SOA, SRV, NS
* Return records as GVariant tuples.
* Make the GSrvTarget lookups a wrapper over this new
functionality.
* Rework the resolver test so that it has support for
looking up MX, NS, SOA, TXT records, and uses GOptionContext
https://bugzilla.gnome.org/show_bug.cgi?id=672944
These binaries are now only used by the test suite. glib-genmarshal
*used* to be required to generate marshallers, but isn't anymore now
that we use libffi (via g_cclosure_marshal_generic).
https://bugzilla.gnome.org/show_bug.cgi?id=667806
This patch solves two problems:
First, it allows builders to optionally cut the circular dependency
between dbus and glib by disabling the modular tests (just like how
the tests can be disabled in dbus).
Second, the tests are entirely pointless to build if cross-compiling.
It also moves us slightly closer to the long term future we want where
the tests are a separate ./configure invocation and run against the
INSTALLED glib, not the one in the source tree. This would allow us to
run the tests constantly, not just when glib is built.
https://bugzilla.gnome.org/show_bug.cgi?id=667806
I added a setlocale call, because we need it for Unicode to
come out right; but I forgot to fix the locale, so we now
fail when comparing error messages to the expected (English)
result. Correct this by setting LANG explicitly to en_US.utf-8.
https://bugzilla.gnome.org/show_bug.cgi?id=669285