summaryrefslogtreecommitdiff
path: root/glib
Commit message (Collapse)AuthorAgeFilesLines
* GBitLock: turn assumptions of g_futex_int_address into a static assertionSimon McVittie2012-01-021-0/+6
| | | | | | | We'll probably never encounter a platform where these fail, but that's what static assertions are for... https://bugzilla.gnome.org/show_bug.cgi?id=548954
* gthread.h: avoid anonymous unionRyan Lortie2012-01-021-1/+1
| | | | | | This is a GNU extension. https://bugzilla.gnome.org/show_bug.cgi?id=666978
* Correct some Since tagsMatthias Clasen2011-12-291-2/+2
| | | | | As pointed out in bug 666951, g_mkdtemp and g_mkdtemp_full were only added in 2.30.
* Fix to handle '\v' (vertical tab) by g_strescape() and g_strcompress().Ravi Sankar Guntur2011-12-272-9/+16
| | | | | | | | | fix enables g_strescape() and g_strcompress() to handle '\v' along with other special characters - '\b', '\f', '\n', '\r', '\t', '\'. https://bugzilla.gnome.org/show_bug.cgi?id=664830 Signed-off-by: Ravi Sankar Guntur <ravi.g@samsung.com>
* Add undefined/no-undefined mode options to GTesterSimon McVittie2011-12-273-1/+44
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=666116
* various tests: do not provoke SIGTRAP with -m no-undefinedSimon McVittie2011-12-279-103/+189
| | | | | | | | | | | Some of the GLib tests deliberately provoke warnings (or even fatal errors) in a forked child. Normally, this is fine, but under valgrind it's somewhat undesirable. We do want to follow fork(), so we can check for leaks in child processes that exit gracefully; but we don't want to be told about "leaks" in processes that are crashing, because there'd be no point in cleaning those up anyway. https://bugzilla.gnome.org/show_bug.cgi?id=666116
* Clarify documentation of fast/slow/thorough and quiet/verbose testsSimon McVittie2011-12-271-4/+11
| | | | | | | It turns out that there is no middle setting between fast and slow/thorough, but there *is* a middle setting between quiet and verbose. https://bugzilla.gnome.org/show_bug.cgi?id=666116
* Don't put documentation in glibconfig.hMatthias Clasen2011-12-271-0/+3
|
* Remove obsolescent AC_HEADER_STDC macroMatthias Clasen2011-12-271-2/+0
| | | | | We only used the resulting define in one place, and really, these headers just have to be around or its not worth trying.
* docs: g_atexit: do not point in a direction for where to find detailsThomas Hindoe Paaboel Andersen2011-12-271-2/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=666804
* docs: Clarify non-NUL requirement in g_utf8_validate()Benjamin Otte2011-12-241-1/+1
| | | | | | | UTF8 validation is not about your character on a dating site, so don't talk about meeting. https://bugzilla.gnome.org/show_bug.cgi?id=666803
* Bug 666551-Fix a few dangling pointersrodrigorivascosta2011-12-221-0/+5
| | | | | | | | When removing an item from the list, check the next one's my_owner, and fix it accordingly. And take this case into account when last of the list is deleted. Also, assign NULL to 'my_owner' in g_thread_xp_WakeConditionVariable.
* glib/tests/private.c: Fix compilation on WindowsChun-wei Fan2011-12-221-1/+2
| | | | | | -process.h must be included for _beginthreadex -Use a cast to HANDLE on _beginthreadex to silence warnings on different types
* winxp threads: fix some condition variable racesRyan Lortie2011-12-191-6/+26
| | | | | | | | | | | | | | | | There are some races in the condition variable emulation code for Windows XP with respect to timeouts while waiting. First, in the event of a timeout, we never remove the waiter from the condition variable. This can cause crashes later. That problem was found by Rodrigo Rivas Costa. Second, if the waiting thread times out and exits just as we were about to call SetEvent() on its waiter event, we could end up trying to access the waiter after it was closed/freed. We need to hold on to the lock a little bit longer to ensure that that's not possible. https://bugzilla.gnome.org/show_bug.cgi?id=666551
* windows XP threads: fix hilariously obvious raceRyan Lortie2011-12-161-7/+12
| | | | | | | | | I tried to do a double-checked lock without the double check. Rodrigo Rivas Costa caught the problem and suggested the (obviously correct) fix. https://bugzilla.gnome.org/show_bug.cgi?id=666296
* Added API g_queue_free_full().Ravi Sankar Guntur2011-12-164-0/+77
| | | | | | | | | | | | | | g_queue_free_full(), to free a Queue including its dynamically-allocated elements. On similar lines to List and Slist. void g_queue_free_full (GQueue *queue, GDestroyNotify free_func); Test case covering g_queue_free_full() is added. Added export symbol to glib.symbols. Closes Bug: https://bugzilla.gnome.org/show_bug.cgi?id=657433 Signed-off-by: Ravi Sankar Guntur <ravi.g@samsung.com>
* GBytes: add a size argument to g_bytes_get_dataStef Walter2011-12-156-24/+41
| | | | | | | * An out size argument so that this is more easily bindable by gobject-introspection. https://bugzilla.gnome.org/show_bug.cgi?id=665879
* g_array_free, g_ptr_array_free: decrement refcount if not the last refSimon McVittie2011-12-141-2/+2
| | | | | | | | | | | | | | | foo_free is conceptually "worth" one unref; not decrementing the refcount here means the GArray or GPtrArray wrapper (but not its contents) would leak in the following call sequence: p = g_ptr_array_new (); g_ptr_array_ref (p); g_ptr_array_free (p, TRUE); g_ptr_array_unref (p); Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666113 Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
* GArray, GPtrArray: factor out the actual freeingSimon McVittie2011-12-141-14/+43
| | | | | | | | | Depending how the array is freed, we may want to free the underlying array (the "segment"), the struct wrapper or both. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666113 Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
* g_key_file_get_string_list: don't leak the pieces on errorSimon McVittie2011-12-141-0/+1
| | | | | | Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666113 Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
* two test fixes for ARMRyan Lortie2011-12-141-2/+2
| | | | | | | First, some ARM systems are not fast enough to meet the 30 second deadline in gwakeuptest.c, so increase that to 60. Second, we have some signed/unsigned woes in the gparam transform tests.
* hash test: avoid leaking various keys and valuesSimon McVittie2011-12-141-7/+75
| | | | | | Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666115 Reviewed-by: Matthias Clasen <mclasen@redhat.com>
* GOptionContext test: free all arguments, not just the remaining onesSimon McVittie2011-12-141-88/+265
| | | | | | | | | | | | | | On success, g_option_context_parse alters argv by removing options that it understood, so g_strfreev is insufficient. Instead, take a shallow copy and free all of the arguments in that, then free the array argv but not its contents. Also, improve the checks in error cases, by checking that argv has not been altered in this way. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666115 Reviewed-by: Matthias Clasen <mclasen@redhat.com>
* various GLib tests: plug memory leaksSimon McVittie2011-12-1423-20/+122
| | | | | | | | | These don't really matter, since it's test code, but they do obscure real leaks in the library. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666115 Acked-by: Matthias Clasen <mclasen@redhat.com>
* g_variant_byteswap: don't leak serialised.dataSimon McVittie2011-12-141-1/+1
| | | | | | Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666113 Reviewed-by: Matthias Clasen <mclasen@redhat.com>
* g_data_set_internal: avoid use-after-free if datalist is in datasetSimon McVittie2011-12-141-2/+8
| | | | | | | | | | Removing the last thing in a dataset frees the dataset, and if the datalist was in a dataset, we can't safely unlock it after the dataset has been freed. Unlock it sooner. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666113 Reviewed-by: Matthias Clasen <mclasen@redhat.com>
* g_strcompress: check that source is non-NULL rather than just crashingSimon McVittie2011-12-141-2/+7
| | | | | | | | | | | | Calling this function with a NULL argument is considered to be invalid, but one of the regression tests does it anyway (to watch it crash), which seems a good indication that it's expected to be somewhat common. Let's check it rather than segfaulting. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666113 Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com> Reviewed-by: Matthias Clasen <mclasen@redhat.com>
* GKeyFile: free group comments when the group is removedSimon McVittie2011-12-141-0/+6
| | | | | | | | These were leaked. Valgrind was sad. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666113 Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
* g_hmac_get_string: don't allocate and leak an unused bufferSimon McVittie2011-12-141-1/+5
| | | | | | | | Also document why we're not actually using the buffer for anything. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666113 Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
* g_hmac_copy: initialize the refcountSimon McVittie2011-12-141-0/+1
| | | | | | | | | In practice, the uninitialized refcount will typically mean that the copy is never freed, and leaks. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666113 Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
* Add an explicit deprecation note to g_thread_initMatthias Clasen2011-12-141-0/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=666145
* documentation fixesStef Walter2011-12-1324-126/+161
| | | | | | | | Fixes for gtk-doc warnings. http://bugzilla.gnome.org/show_bug.cgi?id=66469 https://bugzilla.gnome.org/show_bug.cgi?id=664699
* Fix since tagMatthias Clasen2011-12-101-1/+1
|
* GDate: gtk-doc fixupRyan Lortie2011-12-101-7/+11
|
* unicode: Fix a few issues with G_UNICHAR_MAX_DECOMPOSITION_LENGTHPhilip Withnall2011-12-063-5/+6
| | | | | | | | | | Raised by Matthias in bgo#665685 but which I didn't spot until after pushing commit 3ac7c35656649b1d1fcf2ccaa670b854809d4cd8. Renames G_UNICHAR_MAX_DECOMPOSITION_LEN to G_UNICHAR_MAX_DECOMPOSITION_LENGTH and fixes a few documentation issues. See: bgo#665685
* Bug 665685 — Add a #define for the max length of a Unicode decompositionPhilip Withnall2011-12-063-4/+16
| | | | | | | Add G_UNICHAR_MAX_DECOMPOSITION_LEN for the maximum length of the decomposition of a single Unicode character. Closes: bgo#665685
* Minor doc fix.Behdad Esfahbod2011-12-061-1/+1
|
* MinorBehdad Esfahbod2011-12-061-1/+1
|
* GVariant: add preconditions to ref. counting functionsPhilip Withnall2011-12-021-0/+10
| | | | | | | These prevent GVariants from accidentally being brought back to life after being freed, and should make it easier to track down ref. counting issues. Closes: bgo#665184
* Don't abort if g_ascii_strtod tests failMatthias Clasen2011-11-291-23/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=652560
* Remove two useless lines of codeGeek872011-11-291-2/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=648516
* Fix a little comment error in the _GTreeNode structGeek872011-11-291-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=648516
* gtester: Add command line option to skip testsCarlos Garcia Campos2011-11-272-0/+35
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=664809
* GBytes: A new type for an immutable set of bytes.Stef Walter2011-11-2419-369/+1068
| | | | | | | | | | | | | | | * Represents an immutable reference counted block of memory. * This is basically the internal glib GBuffer structure exposed, renamed, and with some additional capabilities. * The GBytes name comes from python3's immutable 'bytes' type * GBytes can be safely used as keys in hash tables, and have functions for doing so: g_bytes_hash, g_bytes_equal * GByteArray is a mutable form of GBytes, and vice versa. There are functions for converting from one to the other efficiently: g_bytes_unref_to_array() and g_byte_array_free_to_bytes() * Adds g_byte_array_new_take() to support above functions https://bugzilla.gnome.org/show_bug.cgi?id=663291
* Add some more mainloop testsMatthias Clasen2011-11-221-0/+178
|
* Remove unnecessary includesMatthias Clasen2011-11-221-3/+0
| | | | | These were meant for some other test that ended up not getting added. This fixes bug 664559.
* Add back required _XOPEN_SOURCE defineMatthias Clasen2011-11-221-0/+1
| | | | | This got lost somewhere between 2.30 and now, but it is needed for isnan(). See bug 664354, reported by Tim Mooney.
* Missed a couple of @returnsRyan Lortie2011-11-211-3/+6
|
* GVariant: drop use of @returnsRyan Lortie2011-11-215-129/+249
|
* gbitlock: Drop @returns syntax from doc commentsMatthias Clasen2011-11-211-2/+4
|