summaryrefslogtreecommitdiff
path: root/gobject
AgeCommit message (Collapse)AuthorFilesLines
2011-10-18gobject: Use G_VALUE_INITJavier Jardón12-46/+46
2011-10-16push G_THREADS_MANDATORY over the cliffRyan Lortie1-2/+0
This was used as an optimisation for the macro hackery that used to live in gthread.h. If a particular library or program knew that it could rely on thread support being enabled, it would allow for static evaluation of conditionals in some of those macros. Since the macros are dead and thread support is now always-on, we can get rid of this bit of legacy.
2011-10-16gobject/gio: some last missed statics/incluesRyan Lortie3-2/+3
2011-10-16more 'static' adding in testcasesRyan Lortie8-6/+22
No dead code found this time...
2011-10-15Document that types are limited to 64 KiBSimon McVittie1-1/+8
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=659916 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-10-15Turn GKeyFile into a boxed for introspectionGiovanni Campagna3-0/+13
Using the new refcounting API, introduce a boxed type wrapping GKeyFile and expose it introspection bindings in glib-types.h.
2011-10-13g_thread_new: never failRyan Lortie1-1/+1
Remove the GError argument from g_thread_new() and abort on failure. Introduce g_thread_try() for those who want to handle failure.
2011-10-13thread: nuke the concept of 'joinable'Ryan Lortie1-1/+1
And remove the 'joinable' argument from g_thread_new() and g_thread_new_full(). Change the wording in the docs. Clarify expectations for (deprecated) g_thread_create().
2011-10-12Disable deprecations where appropriate in testsMatthias Clasen4-3/+5
2011-10-11Use GLIB_DEPRECATED instead of G_GNUC_DEPRECATED in our headersChun-wei Fan4-6/+11
This will let others opt out of seeing GLib deprecation warnings by defining GLIB_DISABLE_DEPRECATION_WARNINGS. https://bugzilla.gnome.org/show_bug.cgi?id=661438
2011-10-08Add G_GNUC_DEPRECATED to deprecated functions in gobjectMatthias Clasen4-8/+8
2011-10-06gobjet/gclosure.c: Fix styling issuesChun-wei Fan1-1/+1
...so that it looks more consistent with the rest.
2011-10-06gobject/gclosure.c: Add type cast for int_val = valueChun-wei Fan1-1/+1
This will silence compiler warnings on Visual C++. (Sorry for the bad fix just now.)
2011-10-06Revert "gobject/gclosure.c: Made up for missed pointer deref"Chun-wei Fan1-1/+1
This reverts commit d792a1ebe445cfab942ee9e079daa3b87bd60304.
2011-10-06gobject/gclosure.c: Made up for missed pointer derefChun-wei Fan1-1/+1
The value parameter is a gpointer * (void **), but ffi_arg itself is not a pointer type, so make up for dereference here.
2011-10-05closure: fix handling of ENUMs and integral return types on 64-bit BE platformsDan Williams1-17/+59
enums are stored in v_long but need to be marshalled as signed integers. On platforms where int is 32 bits, taking the address of v_long resulted in the wrong 32 bits being marshalled. So we need to stuff the enum's int-sized value to a temporary int-sized variable and marshall that instead. Second, on return, libffi actually returns a pointer to a value that's sized according to platform conventions, not according to what the caller requested. ie if ffi_type_sint was requested, the value can still be a 64-bit sign-extended long on a 64-bit architecture like PPC64, thus the caller cannot simply cast the return value as a pointer to the desired type, but must cast as a pointer to an integral type and then cast to the desired type to remove any sign extension complications. For more information on how to correctly handle libffi return values, see the following bug, specifically comment 35: https://bugzilla.redhat.com/show_bug.cgi?id=736489 "For 64-bit ABIs that extend integral returns types to 64-bits, libffi always returns full 64-bit values that you can truncate in the calling code. It's just the way it is has always been. Please don't change libffi. I'll document this clearly for the next version (perhaps there is a mention of this, I haven't looked yet). The same is true for returning 8-bit values, for instance, on 32-bit systems. All ABIs extend those results to the full 32-bits so you need to provide a properly aligned buffer that's big enough to hold the result." https://bugzilla.gnome.org/show_bug.cgi?id=659881
2011-10-04Remove g_mutex_new()/g_cond_new() in testcasesRyan Lortie2-22/+17
These were the last users of the dynamic allocation API. Keep the uses in glib/tests/mutex.c since this is actually meant to test the API (which has to continue working, even if it is deprecated). https://bugzilla.gnome.org/show_bug.cgi?id=660739
2011-10-04Deprecate g_thread_init()Ryan Lortie1-3/+0
Move the last few things that needed thread-safe initialisation to a global ctor. https://bugzilla.gnome.org/show_bug.cgi?id=660744
2011-10-04Warn when classes/instances exceed the allowed size, if possibleSimon McVittie1-0/+6
It's impossible to check this if the library user is using g_type_register_static, but in that case their compiler should hopefully warn about the truncation. This fixes it for G_DEFINE_TYPE and friends, at least. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=659916 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Colin Walters <walters@verbum.org>
2011-10-02locks: drop _INIT macrosRyan Lortie2-3/+3
All locks are now zero-initialised, so we can drop the G_*_INIT macros for them. Adjust various users around GLib accordingly and change the docs. https://bugzilla.gnome.org/show_bug.cgi?id=659866
2011-09-28tests: add signal marshalling return tests for int/uintDan Williams1-0/+104
https://bugzilla.gnome.org/show_bug.cgi?id=659881
2011-09-28tests: fix generic closure marshalling testsDan Williams1-4/+4
We're testing enums here, not flags, so we need to make sure we're trying to send enums through the marshalling. https://bugzilla.gnome.org/show_bug.cgi?id=659881
2011-09-28tests: Add some return value torture testcases for the generic marshallerDan Williams1-0/+106
Ensure that ENUM types are properly marshalled back from libffi types to glib types, which was failing on ppc64. https://bugzilla.gnome.org/show_bug.cgi?id=659881
2011-09-22gvalue: Add explicitly signed g_value_get_schar() and g_value_set_schar()Colin Walters7-7/+61
The documentation for G_TYPE_CHAR says: "The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed integer." However the return value for g_value_get_char() was just "char" which in C has an unspecified signedness; on e.g. x86 it's signed (which matches the GType), but on e.g. PowerPC or ARM, it's not. We can't break the old API, so we need to suck it up and add new API. Port most internal users, but keep some tests of the old API too. https://bugzilla.gnome.org/show_bug.cgi?id=659870
2011-09-22tests: Add a some torture test cases for the generic marshallerColin Walters1-0/+136
In particular this has a test case for a G_TYPE_ENUM which we were running into a failure on ppc64. https://bugzilla.gnome.org/show_bug.cgi?id=659881
2011-09-22Fix annotations for source/target in g_object_bind_property_*Emmanuele Bassi1-6/+6
We use gpointer for convience of the C API users, but introspection users will not like it. https://bugzilla.gnome.org/show_bug.cgi?id=659838
2011-09-21gtype: port from GStaticRWLock to GRWLockRyan Lortie1-9/+9
2011-09-21Port internal GStaticRecMutex users to GRecMutexRyan Lortie1-11/+11
2011-09-21GParamSpecPool: port from GStaticMutex to GMutexRyan Lortie1-19/+16
2011-09-09Make threads mandatoryDan Winship2-7/+1
G_THREADS_ENABLED still exists, but is always defined. It is still possible to use libglib without threads, but gobject (and everything above it) is now guaranteed to be using threads (as, in fact, it was before, since it was accidentally impossible to compile with --disable-threads). https://bugzilla.gnome.org/show_bug.cgi?id=616754
2011-09-05GObject docs: resolve broken linksRyan Lortie8-16/+16
Some links were broken due to typos, because functionality was removed in GLib 2.0 or for various other reasons. Fix up as many of them as is reasonable.
2011-08-31Make GMainLoop, GMainContext and GSource boxed typesPavel Holejsovsky3-0/+36
Also add some annotations for better usage of these types in bindings. https://bugzilla.gnome.org/show_bug.cgi?id=657725
2011-08-29Spelling fixesMatthias Clasen10-18/+18
Spelling fixes in comments and docs, provided by Kjartan Maraas in bug 657336.
2011-08-21[gi] Add signal annotationsPavel Holejsovsky2-22/+23
2011-08-19Add missing GClosure annotationsPavel Holejsovsky2-11/+15
2011-08-19Add missing (allow-none) annotations to g_value_set_string functionsPavel Holejsovsky1-4/+4
2011-08-17Add (allow-none) annotation for GValue setters.Pavel Holejsovsky5-13/+13
Assorted g_value_set_xxx() and g_value_take_xxx() functions actually allow NULL in source parameter.
2011-08-13Add G_VALUE_INITMarc-André Lureau2-3/+19
The implementation of GValue is not public or documented. When allocated on the stack, initializing a GValue is usually done as documented with: GValue value = { 0, }; There is lot code around (including WebKit) that added all the missing fields, resulting in this ugly and non-obvious: GValue value = { 0, { { 0 } } }; However, this doesn't play nice with -Wmissing-field-initializers for example. Thus, G_VALUE_INIT. http://bugzilla.gnome.org/show_bug.cgi?id=654793 http://bugzilla.gnome.org/show_bug.cgi?id=577231
2011-08-13Trivial typo fixMatthias Clasen1-1/+1
2011-08-11[gobject] Fix G_DEFINE_BOXED_TYPE compilation with C++Behdad Esfahbod1-1/+1
2011-08-08Document libffi as new dependencyMatthias Clasen1-1/+1
2011-07-22gitignore tweaksRyan Lortie1-0/+1
2011-07-21GParam: try to avoid further invalid usesRyan Lortie2-18/+23
In an attempt to avoid some potential future abuses of the GParamSpec API, qualify the 'name' field of the structure as 'const' and add a comment noting that it is an interned string. This is a theoretical API break, but it will only ever result in warnings -- and even then, only if you were already doing something questionable. Clean up some of the warnings that were caused internally in gparam.c from these changes.
2011-07-19Use a generic marshaller if one is not specifiedJohan Dahlin1-8/+23
Since g_cclosure_marshal_generic is always enabled, it makes sense to always use that instead of using generated ones. https://bugzilla.gnome.org/show_bug.cgi?id=654917
2011-07-15GParamSpec: intern property namesRyan Lortie2-7/+13
Make it so that the ->name property on all GParamSpec objects is an interned string. https://bugzilla.gnome.org/show_bug.cgi?id=654627
2011-07-12GVariant: add g_variant_take_ref()Ryan Lortie1-7/+7
This function implements the following logic: if (g_variant_is_floating (value)) g_variant_ref_sink (value); which is used for consuming the return value of callbacks that may or may not return floating references. This patch also replaces a few instances of the above code with the new function (GSettings, GDBus) and lifts a long-standing restriction on the use of floating values as the return value for signal handlers by improving g_value_take_variant(). https://bugzilla.gnome.org/show_bug.cgi?id=627974
2011-07-10Don't test negative values in ulong conversionsMatthias Clasen1-3/+3
This is failing on 32bit build slaves.
2011-07-10Don't needlessly use "echo -e"Martin Storsjo1-1/+1
The -e parameter to echo isn't recognized by echo in POSIX sh, but isn't needed when no escaped characters need to be interpreted. This fixes building glib with a mingw cross compiler on Mac OS X. https://bugzilla.gnome.org/show_bug.cgi?id=654085
2011-06-24Typo fix.Krzesimir Nowak1-1/+1
Fixes jhbuilding gobject-introspection.
2011-06-24Add boxed GType for GMatchInfoChristian Persch3-0/+13