Ryan Lortie [Tue, 5 Feb 2013 17:48:37 +0000 (18:48 +0100)]
GLib 2.35.7
Milo Casagrande [Tue, 5 Feb 2013 18:22:03 +0000 (19:22 +0100)]
[l10n] Updated Italian translation.
Matthias Clasen [Tue, 5 Feb 2013 03:46:24 +0000 (22:46 -0500)]
Make G_IO_FLAG_IS_WRITEABLE and enum value
Having it as a define was causing some problems for bindings.
https://bugzilla.gnome.org/show_bug.cgi?id=657045
Matthias Clasen [Tue, 5 Feb 2013 03:35:29 +0000 (22:35 -0500)]
docs: Add 2 missing :
The file attribute names go by namespace::keyname, not
namespace:keyname.
https://bugzilla.gnome.org/show_bug.cgi?id=636683
Andoni Morales Alastruey [Sat, 10 Nov 2012 15:27:56 +0000 (16:27 +0100)]
configure: fix check for atomic operations
Some compilers have support for atomic operations, but do not
define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4. Instead of checking
for this define, we check for __sync_bool_compare_and_swap and
define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 if the compiler doesn't
define it.
https://bugzilla.gnome.org/show_bug.cgi?id=682818
Víctor Manuel Jáquez Leal [Sun, 3 Feb 2013 18:52:58 +0000 (19:52 +0100)]
Compile private test with -pthread on UNIX
The commit
f5f151cb removed this linkage, which is needed,
at least for the toolchain gcc version 4.7.2 (Debian 4.7.2-5)
https://bugzilla.gnome.org/show_bug.cgi?id=693105
Matthias Clasen [Sun, 3 Feb 2013 20:14:57 +0000 (15:14 -0500)]
Post-release version bump
Matthias Clasen [Sun, 3 Feb 2013 19:25:09 +0000 (14:25 -0500)]
2.35.6
Matthias Clasen [Sun, 3 Feb 2013 19:08:02 +0000 (14:08 -0500)]
Document GIO_USE_FILE_MONITOR
Matthias Clasen [Sun, 3 Feb 2013 18:50:36 +0000 (13:50 -0500)]
Fix a doc comment mismatch
Matthias Clasen [Sun, 3 Feb 2013 18:46:50 +0000 (13:46 -0500)]
Trivial doc comment formatting fix
Matthias Clasen [Sun, 3 Feb 2013 18:26:36 +0000 (13:26 -0500)]
add 2.36 index to gobject docs
Matthias Clasen [Sun, 3 Feb 2013 18:25:56 +0000 (13:25 -0500)]
Add 2.36 index to glib docs
Matthias Clasen [Sun, 3 Feb 2013 18:24:59 +0000 (13:24 -0500)]
Add a 2.36 index to gio docs
Matthias Clasen [Sun, 3 Feb 2013 18:22:28 +0000 (13:22 -0500)]
Minor doc build cleanups
Matthias Clasen [Sun, 3 Feb 2013 18:17:59 +0000 (13:17 -0500)]
Make GUnixFDSourceFunc show up in the docs
Matthias Clasen [Sun, 3 Feb 2013 15:21:20 +0000 (10:21 -0500)]
Use g_timeout_add_seconds for some long timeouts
https://bugzilla.gnome.org/show_bug.cgi?id=692618
Lars Uebernickel [Thu, 31 Jan 2013 10:44:32 +0000 (11:44 +0100)]
gmenumodel: add G_MENU_ATTRIBUTE_ACTION_NAMESPACE
https://bugzilla.gnome.org/show_bug.cgi?id=692928
Lars Uebernickel [Thu, 31 Jan 2013 10:35:49 +0000 (11:35 +0100)]
gmenumodel: document G_MENU_{ATTRIBUTE,LINK}_*
https://bugzilla.gnome.org/show_bug.cgi?id=692928
Lars Uebernickel [Thu, 31 Jan 2013 10:03:14 +0000 (11:03 +0100)]
gmenuexporter: fix typo in docstring
https://bugzilla.gnome.org/show_bug.cgi?id=692928
Matthias Clasen [Sun, 3 Feb 2013 14:50:48 +0000 (09:50 -0500)]
Avoid a portability problem in the checksum test
String literals are not guaranteed to work like this.
https://bugzilla.gnome.org/show_bug.cgi?id=570572
Matthias Clasen [Sun, 3 Feb 2013 06:28:50 +0000 (01:28 -0500)]
Fix deprecation note for g_static_mutex_free
It should point at g_mutex_clear, not g_mutex_free.
https://bugzilla.gnome.org/show_bug.cgi?id=678223
Matthias Clasen [Sun, 3 Feb 2013 06:11:02 +0000 (01:11 -0500)]
Make G_DISABLE_DEPRECATED work again for wholly deprecated headers
Patch by Milan Crha,
https://bugzilla.gnome.org/show_bug.cgi?id=688169
Dan Winship [Thu, 23 Aug 2012 16:39:26 +0000 (12:39 -0400)]
g_option_context_help: don't modify the input data
If there are options that need their names to be aliased, keep track
of that internally rather than modifying the passed-in GOptionGroup
(and leaking strings in the process).
https://bugzilla.gnome.org/show_bug.cgi?id=682560
Matthias Clasen [Sun, 3 Feb 2013 03:54:15 +0000 (22:54 -0500)]
Silence automake
automake doesn't like INCLUDES anymore.
Matthias Clasen [Sat, 2 Feb 2013 21:53:45 +0000 (16:53 -0500)]
Log errors the same way as messages
This will make sense if we keep going past
the assertions that cause the error to be logged.
Matthias Clasen [Sat, 2 Feb 2013 21:26:17 +0000 (16:26 -0500)]
Simplify glib/glib/tests setup
The Makefile.am was setting a ton of unnecessary things
Matthias Clasen [Sat, 2 Feb 2013 21:23:03 +0000 (16:23 -0500)]
Make the logging test more robust
The default handler test was not unsetting the log handler that
gets installed by GTest, which causes the log messages to be duplicated
on stdout if --verbose or --tap are passed. This in turn can make some
of the non-match checks fail. Since we are already using g_test_trap_fork,
we can just unset the handler in the child.
Piotr Drąg [Sat, 2 Feb 2013 23:24:14 +0000 (00:24 +0100)]
Updated Polish translation
Yaron Shahrabani [Sat, 2 Feb 2013 09:23:56 +0000 (11:23 +0200)]
Updated Hebrew translation.
Will Thompson [Tue, 29 Jan 2013 16:09:40 +0000 (16:09 +0000)]
Test for g_hash_table_insert() corrupting sets
https://bugzilla.gnome.org/show_bug.cgi?id=692815
Ryan Lortie [Wed, 30 Jan 2013 00:23:48 +0000 (01:23 +0100)]
hashtable: properly handle insert() de-set-ifying
GHashTable remains a set for as long as all of the keys are exactly
equal (in pointer value) to all of the values. We check this by
comparing keys to values when we do inserts.
Unfortunately, when doing g_hash_table_insert() when a key is already in
the table, the old key pointer value is kept, but the new value pointer
is used. Now we have a situation where a key pointer is unequal to a
value pointer, but we were not treating this case properly.
Fix that.
https://bugzilla.gnome.org/show_bug.cgi?id=692815
Руслан Ижбулатов [Sat, 19 Jan 2013 07:50:28 +0000 (11:50 +0400)]
Fix gio tests makefile for W32
While compiling, libtool will say that undefined symbols are not allowed, and
will refuse to make you a dll. This is only one line, easy to miss. And it
doesn't prevent `make' from completing successfully.
The code this patch adds is from other Makefile.am files that use
$(no_undefined). It's absence in gio is, most likely, an oversight.
Fixes #692058
Matthias Clasen [Sat, 2 Feb 2013 05:19:15 +0000 (00:19 -0500)]
Don't try to find nfs mounts on Windows
This should fix the build there.
https://bugzilla.gnome.org/show_bug.cgi?id=592211
Ryan Lortie [Fri, 1 Feb 2013 03:56:23 +0000 (04:56 +0100)]
gmain: equivocate a bit on _set_ready_time()
Since this is a new API this cycle it's a good time to add a doc comment
explicitly declaring that a confusing issue that could be resolved
either way has no specific defined behaviour.
This may allow us some additional freedom in future GMainContext work or
we may decide that one behaviour is more desirable than the other.
Stef Walter [Wed, 30 Jan 2013 10:13:38 +0000 (11:13 +0100)]
gdbus: Don't output invalid nested <para> docbook tags
Fix gdbus-codegen so it no longer outputs tags like
<para><para>Text</para></para>
https://bugzilla.gnome.org/show_bug.cgi?id=692865
Stef Walter [Wed, 30 Jan 2013 10:07:52 +0000 (11:07 +0100)]
gdbus: Don't output invalid empty <variablelist> tags
Docbook doesn't allow an empty <variablelist> and so the docbook
output from gdbus-codegen is invalid when a method/signal has
no arguments.
https://bugzilla.gnome.org/show_bug.cgi?id=692865
Dan Winship [Wed, 12 Dec 2012 15:00:26 +0000 (16:00 +0100)]
GInetSocketAddress: fix the byte order of flowinfo and scope_id
The flowinfo and scope_id fields of struct sockaddr_in6 are in host
byte order, but the code previously assumed they were in network byte
order. Fix that.
This is an ABI-breaking change (since before you would have had to use
g_ntohl() and g_htonl() with them to get the correct values, and now
that would give the wrong values), but the previous behavior was
clearly wrong, and no one ever reported it, so it is likely that no
one was actually using it.
https://bugzilla.gnome.org/show_bug.cgi?id=684404
Cosimo Cecchi [Wed, 30 Jan 2013 16:59:09 +0000 (17:59 +0100)]
gmacros: add G_GNUC_UNUSED to G_STATIC_ASSERT
Silence some warnings seen with GCC 4.8.
Kjartan Maraas [Tue, 29 Jan 2013 18:36:58 +0000 (19:36 +0100)]
Updated Norwegian bokmål translation
Colin Walters [Fri, 25 Jan 2013 17:05:26 +0000 (12:05 -0500)]
Add g_close(), use it
There are two benefits to this:
1) We can centralize any operating system specific knowledge of
close-vs-EINTR handling. For example, while on Linux we should never
retry, if someone cared enough later about HP-UX, they could come by
and change this one spot.
2) For places that do care about the return value and want to provide
the caller with a GError, this function makes it convenient to do so.
Note that gspawn.c had an incorrect EINTR loop-retry around close().
https://bugzilla.gnome.org/show_bug.cgi?id=682819
Simon McVittie [Sat, 26 Jan 2013 17:37:33 +0000 (17:37 +0000)]
g_atomic_int_get, g_atomic_pointer_get: accept const arguments
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Matthias Clasen <mclasen@redhat.com>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=692583
Matej Urbančič [Sun, 27 Jan 2013 21:03:12 +0000 (22:03 +0100)]
Updated Slovenian translation
Colin Walters [Fri, 25 Jan 2013 15:40:45 +0000 (10:40 -0500)]
GFile: Clean up file_copy_fallback to fix SEGV with btrfs
Ok, this function was just an awful mess before. Now the problem
domain is not trivial, and I won't claim this new code is *beautiful*,
but it should fix the bug at hand, and be somewhat less prone to
failure for the next person who tries to modify it. There's only one
unref call for each object now.
https://bugzilla.gnome.org/show_bug.cgi?id=692408
Aurimas Černius [Sat, 26 Jan 2013 18:24:32 +0000 (20:24 +0200)]
Updated Lithuanian translation
Rui Matos [Sat, 26 Jan 2013 18:08:08 +0000 (19:08 +0100)]
gsequence: Fix g_sequence_lookup() return value documentation
Mention that we return NULL if the item we are looking up isn't
found.
Dan Winship [Sat, 26 Jan 2013 15:09:33 +0000 (10:09 -0500)]
.gitignore updates
Matthias Clasen [Sat, 26 Jan 2013 01:09:26 +0000 (20:09 -0500)]
Plug a small memleak in gdbus-export test
Colin Walters [Fri, 25 Jan 2013 17:32:39 +0000 (12:32 -0500)]
gfile: Ensure we create internal pipe with FD_CLOEXEC
That way the descriptors aren't leaked to child processes.
https://bugzilla.gnome.org/show_bug.cgi?id=692544
Colin Walters [Fri, 25 Jan 2013 17:06:04 +0000 (12:06 -0500)]
gwakeup: Fix uninitialized variable from previous commit
We really don't want to infloop here...
Colin Walters [Wed, 29 Aug 2012 15:44:01 +0000 (11:44 -0400)]
Handle EINTR for a few more write() calls
https://bugzilla.gnome.org/show_bug.cgi?id=682819
Daniel Mustieles [Fri, 25 Jan 2013 11:54:09 +0000 (12:54 +0100)]
Updated Spanish translation
Akira TAGOH [Thu, 24 Jan 2013 03:33:39 +0000 (12:33 +0900)]
gcontenttype: Duplicate the string inside Mutex lock for thread-safety
https://bugzilla.gnome.org/show_bug.cgi?id=692360
Gil Forcada [Thu, 24 Jan 2013 23:17:18 +0000 (00:17 +0100)]
Incorrect string formatters, fixes #692229
Alexander Larsson [Wed, 23 Jan 2013 11:07:10 +0000 (12:07 +0100)]
Ignore fstab entries that are bind mounts
We don't show the bind mounts anyway, so it only leads to
problems when we show the fstab entries, like being unable
to mount them.
https://bugzilla.gnome.org/show_bug.cgi?id=625552
Dan Winship [Mon, 21 Jan 2013 16:25:26 +0000 (11:25 -0500)]
build: fix a srcdir != builddir problem with gnetworking.h
gio's glib-mkenums call needs to get gnetworking.h out of $(builddir),
not $(srcdir). Fix/simplify it by using $(filter) on $^ and letting
make find everything.
Also add -Wno-portability to AM_INIT_AUTOMAKE in configure.ac, so that
it doesn't warn about this (or about the gmake-specific features we
were already using in gio/tests/)
https://bugzilla.gnome.org/show_bug.cgi?id=691866
Colin Walters [Wed, 23 Jan 2013 16:51:48 +0000 (11:51 -0500)]
gtester: Use FD_CLOEXEC when creating pipes
We were already unsetting the cloexec flag for the child later,
just not actually starting with it.
https://bugzilla.gnome.org/show_bug.cgi?id=692404
Dan Winship [Tue, 22 Jan 2013 21:39:49 +0000 (16:39 -0500)]
GNetworkMonitorNetlink: make the netlink socket cloexec
Use the same code GSocket does, to try SOCK_CLOEXEC first, and then
fall back to FD_CLOEXEC if it fails. (And fix that code to not call
fcntl if SOCK_CLOEXEC worked.)
https://bugzilla.gnome.org/show_bug.cgi?id=692332
Shankar Prasad [Wed, 23 Jan 2013 07:29:13 +0000 (12:59 +0530)]
Updated kn translations
Chun-wei Fan [Tue, 22 Jan 2013 06:14:27 +0000 (14:14 +0800)]
build/Makefile-newvs.am: Make description comment clearer
Cosimo Cecchi [Sun, 20 Jan 2013 19:00:50 +0000 (14:00 -0500)]
gfile: don't report completion twice on g_file_load_contents error
When an error occurs while reading the file input stream in
g_file_load_contents (e.g. because the operation was cancelled), the
code is correctly calling g_task_return_error(), but in the callback
from the close operation, g_task_return_boolean() will be called again.
Code that cleans up its state in the async callback will then be called
twice, leading to invalid memory access.
https://bugzilla.gnome.org/show_bug.cgi?id=692202
Cosimo Cecchi [Sun, 20 Jan 2013 18:12:49 +0000 (13:12 -0500)]
inotify: fix a memleak
https://bugzilla.gnome.org/show_bug.cgi?id=692201
Kjartan Maraas [Mon, 21 Jan 2013 11:25:16 +0000 (12:25 +0100)]
Updated Norwegian bokmål translation
Giovanni Campagna [Thu, 3 Jan 2013 21:53:06 +0000 (22:53 +0100)]
Install an invalidation notifier for GClosure in g_source_set_closure()
The point of g_source_set_closure() is getting memory management right,
including handling closures disappearing from the outside (for example
because a runtime they refer to is being shutdown). This means that
sources with an associated closure should remove themselves from the
main loop and free memory when the closure is invalidated.
https://bugzilla.gnome.org/show_bug.cgi?id=692034
Gheyret Kenji [Sun, 20 Jan 2013 10:47:16 +0000 (19:47 +0900)]
Updated Uyghur translation
Signed-off-by: Gheyret Kenji <gheyret@gmail.com>
Matthias Clasen [Sun, 20 Jan 2013 08:16:47 +0000 (03:16 -0500)]
Fix a typo
Matthias Clasen [Sun, 20 Jan 2013 08:14:24 +0000 (03:14 -0500)]
Fix g_test_add_vtable
This function was creating a test suite for each added
testcase, when it should have grouped tests according to
their paths.
Matthias Clasen [Sun, 20 Jan 2013 08:12:09 +0000 (03:12 -0500)]
Fix annotation for g_test_fail
The doc comment has a "Since: 2.30" annotation, so make
the header match that.
Matthias Clasen [Sat, 19 Jan 2013 19:30:05 +0000 (14:30 -0500)]
Fix build with -Werror=format
There were a few places in gmarkup.c where we were giving
pointer differences when integers are expected. Fix that
by explicitly casting to int.
https://bugzilla.gnome.org/show_bug.cgi?id=692079
Ryan Lortie [Fri, 18 Jan 2013 23:48:31 +0000 (18:48 -0500)]
fam: implement gio-nfs-{file,directory}-monitor
Declare explicit support for monitor NFS from the fam file monitoring
backend. This will cause it to be preferred for monitoring on NFS, if
it is installed.
https://bugzilla.gnome.org/show_bug.cgi?id=592211
Ryan Lortie [Fri, 18 Jan 2013 23:44:11 +0000 (18:44 -0500)]
localfile: add support for monitoring on NFS
Add a pair of new extension points: 'gio-nfs-file-monitor' and
'gio-nfs-directory-monitor'.
Add a check to GLocalFile when creating a file monitor. If the
requested file is in the user's home directory and the user has an NFS
home directory then attempt to use an implementation of one of the new
extension points. If we don't have any implementations then fall back
to the normal "local" monitors.
https://bugzilla.gnome.org/show_bug.cgi?id=592211
Ryan Lortie [Fri, 18 Jan 2013 23:30:36 +0000 (18:30 -0500)]
file monitors: use new giomodule function
Get rid of the complicated default module detection code in
GLocalFileMonitor and GLocalDirectoryMonitor and use the new
_gio_module_get_default_type() function instead.
This change also adds the ability to override the default file monitor
via the GIO_USE_FILE_MONITOR environment variable in the same way as can
be done for GIO_USE_VFS.
https://bugzilla.gnome.org/show_bug.cgi?id=592211
Ryan Lortie [Fri, 18 Jan 2013 23:27:57 +0000 (18:27 -0500)]
giomodule: add a new "get default" function
_gio_module_get_default() is a very convenient function for modules
implementing a singleton -- it finds the default module by priority
subject to override by a given environment variable name, instantiates
it, and caches the instance for future calls. It also has the ability
to query instances for being 'active' using a callback.
It doesn't work very well for non-singletons (like file monitors).
Add a new function _gio_module_get_default_type() that skips the
instantiation, returning the GType instead. As a replacement for the
'active' callback, a vtable offset can be given for a virtual function
to use to query if a particular backend is supported.
https://bugzilla.gnome.org/show_bug.cgi?id=592211
Chun-wei Fan [Sat, 19 Jan 2013 04:05:12 +0000 (12:05 +0800)]
Update Visual C++ 2010 property sheet
Left out some items to purge in the last commit. Sorry :|
Chun-wei Fan [Sat, 19 Jan 2013 04:02:45 +0000 (12:02 +0800)]
Clean up Visual C++ property sheets
We no longer need entries to generate the .def files in the property sheets
as we are now doing __declspec (dllexport) to export all the needed
symbols. So, purge these items from the property sheets since they are no
longer used.
Chun-wei Fan [Sat, 19 Jan 2013 03:58:47 +0000 (11:58 +0800)]
Bug 688681: Stop using the .def file for GThread Visual C++ builds
We should also stop using gthread/gthread.def file as well, since we
also use __declspec (dllexport) for the two (deprecated) functions there
since commit
f8756694.
This should also silence some linker warnings in x64 builds.
Also get rid of the references to the .symbols files in the
.vcxproj.filters(in) in the various Visual C++ 2010 projects
Cosimo Cecchi [Fri, 18 Jan 2013 22:22:52 +0000 (17:22 -0500)]
timezone: plug a memleak
Cosimo Cecchi [Fri, 18 Jan 2013 22:02:35 +0000 (17:02 -0500)]
timezone: avoid a double GBytes unref
This will cause random memory corruption; functions should not unref
passed-in parameters.
Мирослав Николић [Fri, 18 Jan 2013 22:01:19 +0000 (23:01 +0100)]
Updated Serbian translation
Ryan Lortie [Fri, 18 Jan 2013 21:11:20 +0000 (16:11 -0500)]
GVariant: fix normal-form checking for tuples
GVariant has the concept of fixed-sized types (ie: types for which all
values of the type will have the same size). Examples are booleans,
integers, doubles, etc. Tuples containing only these types are also
fixed size.
When GVariant is trying to deal with a fixed-sized value for which it
doesn't have a sufficient backing store (eg: the case where a
fixed-sized value was created with g_variant_new_data() with an
incorrect number of bytes) it denotes this by setting the size of the
value to the correct fixed size but using a NULL data pointer.
This is well-documented in several code comments and also in the public
API documentation for g_variant_get_data() which describes the situation
number which NULL could be returned.
The decision to deal with this case in this way was changed at the last
minute around the time that GVariant was merged -- originally we had an
elaborate setup involving allocating an internal buffer of sufficient
size to be shared between all invalid values.
Unfortunately, when making this change a small detail was missed.
gvs_tuple_get_child() (the function responsible for deserialising
tuples) was updated to properly check for this case (and it contains a
comment about why it must). gvs_tuple_is_normal() (the function
responsible for verifying if a tuple is in normal form) was not.
We add the check now.
Note that this problem does not exist with any other container type
because tuples are the only container capable of being fixed-sized. All
other container types (arrays, maybes, variants) can contain a variable
number of items or items of variable types (note: we consider dictionary
entries to be two-tuples). The code for validating non-container values
also contains a check for the case of NULL data.
The problem also does not occur in the only other function dealing with
serialised tuples: gvs_tuple_n_children(). Whereas other container
types would have to inspect the serialised data to determine the number
of children, for tuples it can be determined directly from the type.
Ryan Lortie [Fri, 18 Jan 2013 19:33:16 +0000 (14:33 -0500)]
gobject/: Remove abicheck.sh from DIST_EXTRA
Ryan Lortie [Fri, 18 Jan 2013 18:56:10 +0000 (13:56 -0500)]
Add new API checking utility
Add a test script to make sure that (with a few exceptions) only symbols
that start with 'g_' are being exported from our public libraries.
https://bugzilla.gnome.org/show_bug.cgi?id=692029
Ryan Lortie [Fri, 18 Jan 2013 18:27:16 +0000 (13:27 -0500)]
Remove a few more G_GNUC_INTERNAL users
Ryan Lortie [Fri, 18 Jan 2013 18:23:40 +0000 (13:23 -0500)]
Fix visibility for glib/ and gio/ submodules
We have various sub directories in glib/ and gio/ (eg: inotify, gnulib,
pcre, xdgmime, etc.) that build convenience libraries that are then
included into libglib and libgio. The files in these directories need
to be built with the same visibility policy as the files in the first
level directories, so add CFLAGS for them all.
This wasn't a problem when the visibility flags were set directly in
CFLAGS but then we had to deal with some modules that we built that we
explicitly wanted to export symbols from.
For now, we can keep things the way they are because it's less hacky and
although it's a theoretical hazard to forget these CFLAGS, we rarely add
new subdirectories to the build.
Colin Walters [Wed, 28 Nov 2012 17:00:40 +0000 (12:00 -0500)]
Remove most use of G_GNUC_INTERNAL
Now that we use an explicit list of symbols to export, the
G_GNUC_INTERNAL is redundant.
https://bugzilla.gnome.org/show_bug.cgi?id=688681
Ryan Lortie [Mon, 14 Jan 2013 04:31:45 +0000 (23:31 -0500)]
Remove ABI checking scripts
Before this commit, the only difference between the expected and actual
ABI were the addition of _init and _fini symbols in each module (now
that regexp-based export control is not catching those).
Ryan Lortie [Mon, 14 Jan 2013 04:12:23 +0000 (23:12 -0500)]
Remove regexp-based export control
Ryan Lortie [Thu, 17 Jan 2013 03:55:27 +0000 (22:55 -0500)]
gsignal: fix closure invalidation code
This is the bug that has been causing segfaults and criticals when accel
keys are used to close windows via GtkUIManager.
The main cause of this problem was a mistake made in the original patch
when modifying the handler_lookup() to take the extra 'closure'
parameter. The original check used was:
if (handler->sequential_number == handler_id ||
(closure && handler->closure == closure))
It was called to find a particular closure like so:
handler_lookup (instance, 0, closure, &signal_id);
The problem is that the check will return if either the signal ID or
closure matches (if a closure was given). The calling code assumes 0 to
be an invalid signal ID which will match no handlers, but unfortunately
the rest of gsignal code uses this to denote a signal that has already
been disconnected. The result is that this function was searching for a
matching closure _or_ the first already-disconnected handler. When it
found the already-disconnected handler, we'd get criticals and crashes.
The condition has been corrected; it now ignores the handler_id
parameter if the closure parameter is non-NULL.
While we're in here, change the lifecycle of the invalidation notify to
be easier to understand.
Before, the notify was removed when the last reference on the handler
dropped. This could happen in very many situations; often at the end of
an emission. Instead, we now tie the registration of the notifier to
the lifecycle of the signal connection. When the signal is disconnected
we remove the notification, even if other references are held (eg:
because it is currently being dispatched).
https://bugzilla.gnome.org/show_bug.cgi?id=690118
Dan Winship [Wed, 16 Jan 2013 15:09:10 +0000 (10:09 -0500)]
gio/tests: add some more async stream tests
Add read_async() and skip_async() tests to buffered-input-stream.
Fix and re-enable filter-streams's existing close_async() tests, and
add read_async(), skip_async(), and write_async() tests as well. Also,
redo the tests to use dummy GFilterInputStream and GFilterOutputStream
subclasses rather than GBufferedInput/OutputStream, so that we're
testing the base filter stream implementations of everything (since
the buffered stream overrides are already getting tested in the
buffered-input-stream and buffered-output-stream tests anyway).
Add a skip_async() test to unix-streams. (This one would crash without
the bugfix in the previous commit.)
Alban Browaeys [Tue, 15 Jan 2013 23:04:58 +0000 (00:04 +0100)]
gio: callback_data is the task not the task data.
skip_callback_wrapper expect the user_data (callback_data)
to be the task holding the task_data, not the task_data
itself.
Otherwise the task_data is cast as GTask and then task_data
is extracted from this bogus task.
https://bugzilla.gnome.org/show_bug.cgi?id=691812
Ryan Lortie [Tue, 15 Jan 2013 20:40:14 +0000 (15:40 -0500)]
mainloop test: fix a silly memory error
Ryan Lortie [Tue, 15 Jan 2013 20:40:09 +0000 (15:40 -0500)]
mainloop test: use atomic for cross-thread access
Ryan Lortie [Tue, 15 Jan 2013 20:22:35 +0000 (15:22 -0500)]
mainloop test: fix a small typo
This g_assert() could never possibly fail, as it was.
Ryan Lortie [Tue, 15 Jan 2013 04:05:31 +0000 (23:05 -0500)]
tests for the new MainContext/GSource API
Ryan Lortie [Mon, 14 Jan 2013 19:47:16 +0000 (14:47 -0500)]
Add a UNIX fd source
https://bugzilla.gnome.org/show_bug.cgi?id=658020
Ryan Lortie [Mon, 14 Jan 2013 21:53:06 +0000 (16:53 -0500)]
gsource: Add support for file descriptors on UNIX
Adding file descriptors to a GSource provides similar functionality to
the old g_source_add_poll() API with two main differences.
First: the list of handles is managed internally and therefore users are
prevented from randomly modifying the ->events field. This prepares us
for an epoll future where changing the event mask is a syscall.
Second: keeping the list internally allows us to check the ->revents for
events for ourselves, allowing the source to skip implementing
check/prepare. This also prepares us for the future by allowing an
implementation that doesn't need to iterate over all of the sources
every time.
https://bugzilla.gnome.org/show_bug.cgi?id=686853
Ryan Lortie [Tue, 30 Aug 2011 23:14:17 +0000 (19:14 -0400)]
GTimeoutSource: simplify
Take advantage of the new default handling of the 'prepare' and 'check'
functions.
https://bugzilla.gnome.org/show_bug.cgi?id=657729
Ryan Lortie [Mon, 14 Jan 2013 21:51:51 +0000 (16:51 -0500)]
GSource: new API g_source_set_ready_time()
Add an API to mark a GSource to automatically become ready at the
specified monotonic time.
https://bugzilla.gnome.org/show_bug.cgi?id=657729
Ryan Lortie [Mon, 29 Oct 2012 17:26:05 +0000 (18:26 +0100)]
gsource: allow NULL check and prepare functions
Allow for NULL GSourceFuncs.check() and .prepare().
For prepare() the source will be taken not to be ready and having an
infinite timeout. For check() the source will be taken not to be ready.
https://bugzilla.gnome.org/show_bug.cgi?id=686853
Ryan Lortie [Mon, 29 Oct 2012 15:33:18 +0000 (16:33 +0100)]
move GIOCondition to gmain.h from giochannel.h
GIOCondition has uses outside of GIOChannel, so move it to gmain.h.
https://bugzilla.gnome.org/show_bug.cgi?id=686853