summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* property: Add direct access to generated getterswip/gpropertyEmmanuele Bassi2012-11-123-1/+100
| | | | | | | 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.
* gobject: Add GPropertyEmmanuele Bassi2012-11-1217-110/+8478
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* gparam: Introduce nick and blurb settersEmmanuele Bassi2012-11-113-2/+73
| | | | | Instead of having them on GProperty, let's add the static nick and blurb setters where they belong, i.e. GParamSpec.
* Updated Lithuanian translationAurimas Černius2012-11-101-730/+730
|
* Updated Galician translationsFran Diéguez2012-11-101-190/+191
|
* Updated Slovenian translationMatej Urbančič2012-11-101-1/+1
|
* Updated Slovenian translationMatej Urbančič2012-11-101-201/+211
|
* Add an option to make glib-compile-resources use G_GNUC_INTERNALMatthias Clasen2012-11-092-10/+29
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=687742
* Remove trailing space from some translated stringsMatthias Clasen2012-11-092-3/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=687700
* Add plural forms for some translationsMatthias Clasen2012-11-091-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=687698
* Return correct value for g_socket_get_available_bytes() on Windows and OSXSebastian Dröge2012-11-092-4/+64
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=686786
* Fix poll able streams for Darwin (and probably BSD)John Ralls2012-11-095-0/+12
| | | | | | 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.
* Fix compile error about missing prototypeJohn Ralls2012-11-091-0/+2
| | | | For g_nextstep_settings_backend_get_type()
* gthreadedresolver: fix a bug in the GTask porting of lookup_recordsDan Winship2012-11-091-9/+14
| | | | | | | | 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.)
* Use url encoding for trash fileinfo path as per freedesktop trash specificationTimothy Arceri2012-11-091-28/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=687540
* GByteArray: Add missing transfer annotationsMartin Pitt2012-11-091-2/+2
| | | | | | | 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.
* GBytes: Add missing annotationsMartin Pitt2012-11-091-5/+9
| | | | | | | | | | | 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.
* Bug 686185: GDateTime Transcoding fails on OSXJohn Ralls2012-11-081-1/+1
| | | | | Better fix than d5df0a10f. Thanks to Christian Persch for pointing this out.
* Check for PR_GET_NAMEEmmanuel Pacaud2012-11-081-0/+2
| | | | PR_GET_NAME may not be defined when using an old kernel. Deal with it.
* tests/buffered-input-stream: Fix size of parameter passedColin Walters2012-11-071-2/+3
| | | | | | | | 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
* Skip test_non_utf8_printf() if EUC-JP is aliased to UTF-8John Ralls2012-11-061-0/+8
| | | | | | | 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.
* Don't call varargs open() through non-varargs typeRyan Lortie2012-11-061-10/+32
| | | | | | | | | | | | 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
* belated version bumpRyan Lortie2012-11-061-1/+1
|
* gtype: disallow adding interfaces after the factRyan Lortie2012-11-053-11/+18
| | | | | | | | | | | | | | | 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
* Box GPollFD to make it introspectableMartin Pitt2012-11-054-0/+24
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=686797
* Add a translator comment about 'KB'Ryan Lortie2012-11-051-0/+5
| | | | | | | | | | | 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
* gio/gthreadedresolver.c: Fix non-UNIX buildChun-wei Fan2012-11-051-1/+1
| | | | | Move the GError *error declaration up, as that variable is also used for non-Unix builds.
* Updated gujarati fileSweta Kothari2012-11-051-153/+158
|
* Visual C++ 2010 projects: Prepare support for VS2012Chun-wei Fan2012-11-0514-1561/+1621
| | | | | | | | | | | | 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.
* Add array length annotation to GSignalQuery param_types fieldSimon Feltman2012-11-041-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=687541
* Updated Slovak translationPeter Mráz2012-11-031-2/+2
|
* Updated Slovak translationPeter Mráz2012-11-031-2035/+2529
|
* Annotate g_filename_to_utf8()Martin Pitt2012-11-031-4/+5
| | | | | | 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.
* Fix more warning-addition falloutSimon McVittie2012-11-028-24/+33
| | | | | | | | 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>
* Fix more void prototypes in testsSimon McVittie2012-11-022-3/+3
| | | | | Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687441 Reviewed-by: Colin Walters <walters@verbum.org>
* Predeclare more things in testsSimon McVittie2012-11-028-6/+27
| | | | | Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687441 Reviewed-by: Colin Walters <walters@verbum.org>
* Bring back a couple of private-but-extern symbolsSimon McVittie2012-11-021-2/+6
| | | | | | | | | 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>
* gtask: bump the max thread pool size up to 100 to avoid stalls/deadlocksDan Winship2012-11-022-2/+2
| | | | | | 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.
* Use the FreeBSD credentials-passing code on Debian GNU/kFreeBSDSimon McVittie2012-11-022-15/+15
| | | | | | | | | | | | | | 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>
* Merge waitpid() from g_spawn_sync into gmain()Colin Walters2012-11-022-40/+56
| | | | | | | | | | | | | | | | 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
* tests: fix compiler warning in gvariant testTim-Philipp Müller2012-11-021-1/+1
| | | | gvariant.c:3555:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
* configure: Enable set of standard -Werror=foo flagsColin Walters2012-11-022-7/+297
| | | | | | | | | | | | | | | | | | | We're not going to depend on gnome-common (I assume) so this patch nicks the systemd macro to test for compiler flags, and uses it to set a similar set of -Werror=foo as the gnome-common one does. See https://bugzilla.gnome.org/show_bug.cgi?id=608953 See https://mail.gnome.org/archives/desktop-devel-list/2012-July/msg00100.html If we're going to be setting more strict compiler flags for GNOME, we should really ensure GLib builds with them first, as it's kind of the model citizen. In particular, you can see several times that downstreams such as Debian have come in and fixed -Wformat-security bugs. We should never let those get into tarballs, or even commits. https://bugzilla.gnome.org/show_bug.cgi?id=687385
* gdateparser: Delete unused debug print functionColin Walters2012-11-021-16/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=687385
* gdbusactiongroup: Add prototype for g_dbus_action_group_sync()Colin Walters2012-11-025-9/+41
| | | | | | | | Even private functions that are actually called across compilation units should have prototypes. For g_dbus_action_group_sync(), create one in gdbusactiongroup-private.h https://bugzilla.gnome.org/show_bug.cgi?id=687385
* test-pipe-unix: Add missing includeColin Walters2012-11-021-0/+1
| | | | | | Fixes the build with -Werror=missing-prototypes. https://bugzilla.gnome.org/show_bug.cgi?id=687385
* gettext: Add missing includeColin Walters2012-11-021-0/+1
| | | | | | Fixes the build with -Werror=missing-prototypes. https://bugzilla.gnome.org/show_bug.cgi?id=687385
* gcharset: Add header file for private APIColin Walters2012-11-024-2/+36
| | | | | | This fixes the build with -Werror=missing-prototypes. https://bugzilla.gnome.org/show_bug.cgi?id=687385
* gslice: Prototype G_ENABLE_DEBUG function that's part of ABIColin Walters2012-11-021-0/+4
| | | | | | | | Sadly, g_slice_debug_tree_statistics is conditionally part of the public ABI. We might as well make it conditionally part of the API as well, even though this will require people actually using it to https://bugzilla.gnome.org/show_bug.cgi?id=687385
* g_check_setuid: Include glib-private.hColin Walters2012-11-021-1/+2
| | | | | | Otherwise we fail to build with -Werror=missing-prototypes. https://bugzilla.gnome.org/show_bug.cgi?id=687385
* tests/1bitmutex: Hack to build with -Werror=missing-prototypesColin Walters2012-11-011-0/+6
| | | | | | Admittedly, this could probably be better, but it builds. https://bugzilla.gnome.org/show_bug.cgi?id=687385