- Nov 12, 2012
-
-
Emmanuele Bassi authored
This is mostly a WIP/proof of concept patch on top of GProperty. the numbers from the performance test case say that we don't gain much, if at all, by checking if the property maps to a direct field offset, and we get the pointer to the struct member.
-
Emmanuele Bassi authored
Dealing with GParamSpec is tedious and less efficient than necessary; property definitions should be able to either directly access a struct field or specify the accessors pair that control a property. On top of that, most of the property and accessor definition can be autogenerated from simple pre-processor directives. So, here's to you GProperty. GProperty is a GParamSpec sub-class that encapsulates all the types inside a single, opaque structure (to avoid leaking out implementation details); a GProperty can access the structure member holding the value of the property, or invoke the accessor functions passed to its constructor. Type safety is maintained through the GType system and without having to use GValue. Along with GProperty, this patch introduces a series of macros for automating the declaration and definition of property accessor functions, and for automating the collection and lcopy of values without going through GValue. GObject will recognize whether a GParamSpec used to set or get a property is really a GProperty, and thus will shortcircuit most of the GValue-based marshalled code, preferring the direct C function and direct argument collection instead of boxing/unboxing of GValues. https://bugzilla.gnome.org/show_bug.cgi?id=648526
-
- Nov 11, 2012
-
-
Instead of having them on GProperty, let's add the static nick and blurb setters where they belong, i.e. GParamSpec.
-
- Nov 10, 2012
-
-
Aurimas Černius authored
-
Fran Diéguez authored
-
Matej Urbančič authored
-
Matej Urbančič authored
-
-
-
-
- Nov 09, 2012
-
-
John Ralls authored
Darwin's poll doesn't change revents if there are no available events, though it returns 0. Initialize the fd.revents to 0 so that the test passes. That reveals a test failure, though, because with socket streams it takes time for an event to pass through the socket. Provide an 80-usec delay to allow time for the propagation.
-
John Ralls authored
For g_nextstep_settings_backend_get_type()
-
Dan Winship authored
We were passing the wrong destroy notify when returning the list of records, so it would crash if it got called (ie, if you didn't call g_resolver_lookup_records_finish()). (Also fix s/targets/records/ throughout the records functions.)
-
Martin Pitt authored
Make g_byte_array_new() and g_byte_array_new_take() introspectable by adding missing transfer annotations to return value. Covered by tests in PyGObject.
-
Martin Pitt authored
Annotate g_bytes_new*()'s data argument to be a guint8 array, as introspection clients cannot deal with raw gconstpointers. This makes GBytes' behaviour similar to GByteArray whose API already uses guint8. Add missing transfer annotation to g_bytes_get_data() to make it introspectable. This is covered by test cases in PyGObject.
-
- Nov 08, 2012
-
-
John Ralls authored
Better fix than d5df0a10. Thanks to Christian Persch for pointing this out.
-
Emmanuel Pacaud authored
PR_GET_NAME may not be defined when using an old kernel. Deal with it.
-
- Nov 07, 2012
-
-
Colin Walters authored
buffer-size is guint, but the public API is gsize for some reason. Tested-By: <gustavold@linux.vnet.ibm.com> https://bugzilla.gnome.org/show_bug.cgi?id=687801
-
John Ralls authored
See https://bugzilla.gnome.org/show_bug.cgi?id=686185 This skips the test on those systems, like Darwin, which provide the ja_JP.eucjp locale but which glib doesn't know how to transcode and aliases JIS to UTF-8.
-
- Nov 06, 2012
-
-
Allison Karlitskaya authored
open() is probably defined varargs. Casting a varargs function to an equivalent non-varargs type and then calling it is undefined, but gfileutils.c was doing exactly that. Add some non-varargs wrappers to avoid the problem. Problem reported by John Spencer. https://bugzilla.gnome.org/show_bug.cgi?id=687600
-
Allison Karlitskaya authored
-
- Nov 05, 2012
-
-
Allison Karlitskaya authored
Add a check to prevent adding an interface to a class that has already had its class_init done. This is an incompatible change but it is suspected that there are not many users of this functionality. Two known exceptions are pygobject (fixed in bug 686149) and our own testsuite (affected tests have been temporarily disabled by this patch). Once we confirm that nobody else is using this functionality we can remove a rather large amount of code for dealing with this case. https://bugzilla.gnome.org/show_bug.cgi?id=687659
-
-
Allison Karlitskaya authored
The GLib units policy used to be that 'KB' means 1024 bytes, 'MB' means 1024 KB, 'GB' means 1024 MB, etc. Those days are over, but we have a deprecated function that still works that way. It contains the string "KB", marked for translation, which has been a source of confusion for translators on multiple occasions. https://bugzilla.gnome.org/show_bug.cgi?id=687516
-
Chun-wei Fan authored
Move the GError *error declaration up, as that variable is also used for non-Unix builds.
-
Sweta Kothari authored
-
Chun-wei Fan authored
Add the PlatformToolset tag to the project configs so that we can use add a simple script later to the autotools files to copy the projects and change the value (v100 -> v110) of that tag (and other simple changes) in order that we can quickly provide and maintain support for Visual Studio 2012 with minimal effort. Note that at the moment GLib does not yet support the API/SDK requirements for Windows 8 Modern UI (formerly known as Metro), but this paves the very initial step.
-
- Nov 04, 2012
-
-
- Nov 03, 2012
-
-
Peter Mráz authored
-
Peter Mráz authored
-
Martin Pitt authored
bytes_read and bytes_written are (out) arguments, and the return value must be a byte array instead of utf8, as otherwise the function would only support UTF-8 locales/file names.
-
- Nov 02, 2012
-
-
Simon McVittie authored
I'm normally a big fan of small atomic commits, but I also want to get things done this afternoon... Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687441 Reviewed-by: Colin Walters <walters@verbum.org>
-
Simon McVittie authored
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687441 Reviewed-by: Colin Walters <walters@verbum.org>
-
Simon McVittie authored
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687441 Reviewed-by: Colin Walters <walters@verbum.org>
-
Simon McVittie authored
These both existed in 2.34.1, but are not exposed in headers, and were meant to be private. Making them static (in commit 84475e43) was technically an ABI break, and in particular it causes abicheck.sh to fail. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687441 Reviewed-by: Colin Walters <walters@verbum.org>
-
Dan Winship authored
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=686810 for now. https://bugzilla.gnome.org/show_bug.cgi?id=687223 discusses a nicer fix for later.
-
Simon McVittie authored
The __FreeBSD__ macro means we have both a FreeBSD kernel and FreeBSD libc, which isn't the case on GNU/kFreeBSD (GNU libc and userland on the FreeBSD kernel), so it predefines a different macro. The kernel is what actually matters for credentials-passing, though. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Tested-by: Steven Chamberlain <steven@pyro.eu.org> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=649302 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581750 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=631968 Reviewed-by: Dan Winship <danw@gnome.org>
-
Colin Walters authored
This is preparatory work for a future commit which will add a "catchall" waitpid API. If we don't synchronize here with the worker thread, race conditions are possible. This also ensures we have an error message if someone adds a child watch for a nonexistent pid, etc. Previously, we'd simply keep calling waitpid() getting ECHILD, and ignoring it until the source was removed. Now, we g_warning() and fire the source. Thirdly, this ensures that the waitpid() call in gmain handles EINTR, like the g_spawn_sync() one did. https://bugzilla.gnome.org/show_bug.cgi?id=687061
-