Commit Graph

3924 Commits

Author SHA1 Message Date
Jörn Magens
00f1e1f5c2 GSequence: add note about lookup requiring sorting
g_sequence_lookup() only works on sorted sequences, but it's quite easy
to create unsorted sequences.  Add a note to the documentation that the
sequence must be sorted in order for g_sequence_lookup() to work.

https://bugzilla.gnome.org/show_bug.cgi?id=670969
2012-03-02 09:08:30 -05:00
Colin Walters
80611295ab g_uri_unescape_segment: Mention (allow-none)/%NULL in documentation 2012-02-29 13:09:41 -05:00
Christian Persch
51f1297a6e Fixup docs comment 2012-02-27 16:25:50 +01:00
Christian Persch
d2c37669f2 regex: unicode: Update to Unicode 6.1.0
Update some more PCRE tables to Unicode 6.1.0. Should be completely
updated now.
2012-02-27 13:27:13 +01:00
Matthias Clasen
96c98ce62e Improve the wording of the message for G_UNAVAILABLE
The version number we have here is the one the function appeared
in, not the max-allowed version. Therefore 'unavailable before
VERSION' makes more sense than 'unavailable for VERSION'.
2012-02-27 06:54:16 -05:00
Matthias Clasen
4995ef4dd7 Add a 'these are private' note for the version macros 2012-02-27 00:32:13 -05:00
Matthias Clasen
76175ab9ed Improve documentation around deprecations 2012-02-27 00:18:47 -05:00
Emmanuele Bassi
550fcaddf7 Add versioned deprecation annotation
We start from GLib 2.26.

https://bugzilla.gnome.org/show_bug.cgi?id=670542
2012-02-27 00:00:06 -05:00
Emmanuele Bassi
34aeeb7d64 Add flexible API version boundaries
There are cases when it should be possible to define at compile time
what range of functions and types should be used, in order to get,
or restrict, the compiler warnings for deprecated or newly added
types or functions.

For instance, if GLib introduces a deprecation warning on a type in
version 2.32, application code can decide to specify the minimum and
maximum boundary of the used API to be 2.30; when compiling against
a new version of GLib, this would produce the following results:

  - all deprecations introduced prior to 2.32 would emit compiler
    warnings when used by the application code;
  - all deprecations introduced in 2.32 would not emit compiler
    warnings when used by the application code;
  - all new symbols introduced in 2.32 would emit a compiler warning.

Using this scheme it should be possible to have fairly complex
situations, like the following one:

  assuming that an application is compiled with:
    GLIB_VERSION_MIN_REQUIRED = GLIB_VERSION_2_30
    GLIB_VERSION_MAX_ALLOWED  = GLIB_VERSION_2_32

  and a GLib header containing:

    void function_A (void) GLIB_DEPRECATED_IN_2_26;
    void function_B (void) GLIB_DEPRECATED_IN_2_28;
    void function_C (void) GLIB_DEPRECATED_IN_2_30;
    void function_D (void) GLIB_AVAILABLE_IN_2_32;
    void function_E (void) GLIB_AVAILABLE_IN_2_34;

  any application code using the above functions will get the following
  compiler warnings:

    function_A: deprecated symbol warning
    function_B: deprecated symbol warning
    function_C: no warning
    function_D: no warning
    function_E: undefined symbol warning

This means that it should be possible to gradually port code towards
non-deprecated API gradually, on a per-release basis.

https://bugzilla.gnome.org/show_bug.cgi?id=670542
2012-02-26 23:58:41 -05:00
Christian Persch
d70634526d regex: Remove --disable-regex option
https://bugzilla.gnome.org/show_bug.cgi?id=622149
2012-02-26 22:22:56 -05:00
Christian Persch
989c466296 regex: Remove pcre_ucd.c 2012-02-26 22:09:05 -05:00
Christian Persch
706b72db21 regex: Use glib for unicode data
Use g_unichar_type() and g_unichar_get_script() instead of pcre tables.
2012-02-26 22:09:05 -05:00
Christian Persch
75dffb99b3 regex: Remove obsolete patch 2012-02-26 22:09:05 -05:00
Christian Persch
8e8ab99bad regex: unicode: Update to Unicode 6.1.0 2012-02-26 22:09:05 -05:00
Christian Persch
735e4a6a6a regex: Remove obsolete makefile fragments
The update.sh script doesn't work with current PCRE, so these are obsolete.
2012-02-26 22:09:04 -05:00
Christian Persch
afa3375210 regex: Use glib memory allocator 2012-02-26 22:09:04 -05:00
Christian Persch
38309dc482 regex: Remove obsolete patch 2012-02-26 22:09:04 -05:00
Christian Persch
d02f6393df regex: Use g_ascii_is[x]digit 2012-02-26 22:09:04 -05:00
Christian Persch
8aadf6b3c9 regex: Remove obsolete patch
PCRE doesn't even contain the patched file anymore.
2012-02-26 22:09:04 -05:00
Christian Persch
3225b24cb5 regex: Remove obsolete patches
Upstream PCRE has removed the relocations that these patches were fixing;
the patches are obsolete.
2012-02-26 22:09:03 -05:00
Christian Persch
a40523b7f2 regex: Update included PCRE to 8.30 2012-02-26 22:09:03 -05:00
Christian Persch
8280a8ee36 unicode: tests: More script to/from ISO-15924 tests 2012-02-26 21:24:08 -05:00
Christian Persch
58b4cdd38b unicode: tests: Add tests for new scripts 2012-02-26 21:24:08 -05:00
Christian Persch
d133d22932 unicode: tests: Add tests for new line break classes 2012-02-26 21:24:08 -05:00
Christian Persch
2a2f3c4176 unicode: Regenerate tables from Unicode 6.1.0 2012-02-26 21:24:07 -05:00
Christian Persch
d1da9ff080 unicode: Regenerate gscripttable.h for Unicode 6.1.0 2012-02-26 21:24:07 -05:00
Christian Persch
3554026b39 unicode: tests: Remove U+27CD from is-undefined test
It's assigned in Unicode 6.1.0.
2012-02-26 21:24:07 -05:00
Christian Persch
48e01af6f1 unicode: Add new line break classes from Unicode 6.1.0 2012-02-26 21:24:07 -05:00
Christian Persch
fb574834c1 unicode: Add new scripts from Unicode 6.1.0 2012-02-26 21:24:07 -05:00
Stefan Sauer
2161bf254f goption: try to be helpful in goption args/flag checks
When complaining about ill defined GOptionEntries include the name of the option
group and entry in the warning.
2012-02-26 21:22:10 +01:00
John Ralls
47475dbe6a [Bug 529806] Cannot build in 64-bit Mac OS X due to libiconv 2012-02-24 17:04:52 -08:00
Filippo Della Betta
462f7f5a4d Added better support of G_STRFUNC for Visual Studio platform
https://bugzilla.gnome.org/show_bug.cgi?id=670128
2012-02-24 16:21:45 -05:00
Richard Hughes
eece6cb9c3 Fix up 'Since:' for g_mapped_file_new_from_fd()
It was introduced in 2.31.0, not 2.30.x
2012-02-23 10:34:46 +00:00
Dan Winship
98a70df486 gthread-posix: fix order of arguments in g_thread_abort() message 2012-02-22 11:38:43 -05:00
Dan Winship
88182d375e gasyncqueue: fix a 32bit overflow in g_async_queue_timed_pop
also, add a test for g_async_queue_timed_pop() and
g_async_queue_timeout_pop() to tests/asyncqueue.c

https://bugzilla.gnome.org/show_bug.cgi?id=669670
2012-02-22 11:36:08 -05:00
David King
2ca6c475ea docs: Fix g_async_queue_timeout_pop_unlocked typo 2012-02-21 01:10:55 +01:00
David King
912ac79041 docs: Add some missing G_TOKEN_* descriptions 2012-02-21 01:10:54 +01:00
David King
708d4178ce docs: Fix g_key_file_load_from_file error parameter 2012-02-21 01:10:54 +01:00
Matthias Clasen
dbc01d3090 Don't rely on /bin/sh
Another Fedora UsrMove victim !
2012-02-21 00:26:19 +01:00
Christian Persch
eafb108caf gbytes: Add G_BEGIN/END_DECL guards
Bug #670138.
2012-02-15 17:46:31 +01:00
Christian Persch
26f238e85d Plug a mem leak in g_environ_unsetenv
And clarify the memory allocation requirement of the string arrays passed to
g_environ_{,un}setenv().

==9458== 10 bytes in 1 blocks are definitely lost in loss record 16 of 39
==9458==    at 0x402AD89: malloc (vg_replace_malloc.c:236)
==9458==    by 0x4221A1F: vasprintf (vasprintf.c:78)
==9458==    by 0x40C6065: g_vasprintf (gprintf.c:314)
==9458==    by 0x409D894: g_strdup_vprintf (gstrfuncs.c:509)
==9458==    by 0x409D8C9: g_strdup_printf (gstrfuncs.c:535)
==9458==    by 0x40672E9: g_environ_setenv (genviron.c:156)
==9458==    by 0x80490E7: test_environ_array (environment.c:78)
==9458==    by 0x40A3DB5: test_case_run (gtestutils.c:1662)
==9458==    by 0x40A40B2: g_test_run_suite_internal (gtestutils.c:1715)
==9458==    by 0x40A417C: g_test_run_suite_internal (gtestutils.c:1726)
==9458==    by 0x40A42F9: g_test_run_suite (gtestutils.c:1771)
==9458==    by 0x40A3441: g_test_run (gtestutils.c:1319)
==9458==    by 0x80493F1: main (environment.c:108)

Bug #669412.
2012-02-15 17:45:44 +01:00
Dan Winship
ca05902a58 Add G_GNUC_BEGIN/END_IGNORE_DEPRECATIONS
Add new macros to disable -Wdeprecated-declarations around a piece of
code, using the C99 (and GNU89) _Pragma() operator. Replace the
existing use of #pragma for this in gio, and suppress the warnings in
gvaluearray.c as well.

https://bugzilla.gnome.org/show_bug.cgi?id=669671
2012-02-15 09:54:38 -05:00
Giovanni Campagna
d240b88315 GKeyFile: fix annotation of g_key_file_load_from_data
(array) without (element-type) means "array of the same type as
the C type", so gchar* with (array) is interpreted as an array of
strings. Since GKeyFiles must be UTF-8 encoded anyway, just
annotate it as a string.

https://bugzilla.gnome.org/show_bug.cgi?id=658484
2012-02-14 19:05:08 +01:00
Dan Winship
dd553a2ba3 gasyncqueue: deprecate GTimeVal-based methods, add relative-delay ones
https://bugzilla.gnome.org/show_bug.cgi?id=669670
2012-02-13 09:09:08 -05:00
Matthias Clasen
8cb48f644d Fix a parameter name mismatch
gtk-doc gets unhappy if parameters aren't named the same in
headers, sources and doc comments.
2012-02-10 21:09:39 -05:00
Christophe Fergeau
6d3b31a533 Fix g_hash_table_foreach crash with NULL hash table
When G_DISABLE_ASSERT is not defined, g_hash_table_foreach and
g_hash_table_find dereferences the hash table argument before
checking if it's NULL. This causes a crash when one of this function
is mistakenly called with a NULL argument instead of returning
with a warning through g_return_if_fail.
2012-02-10 10:03:38 +01:00
Dan Winship
daf78764e5 gthread-win32: update for g_get_monotonic_time() changes
g_cond_wait_until() was calling GetSystemTimeAsFileTime() to get the
current time, which is no longer what g_get_monotonic_time() returns.

https://bugzilla.gnome.org/show_bug.cgi?id=669329
2012-02-09 06:48:12 -05:00
Ravi Sankar Guntur
90dbaca924 glib/tests: mainloop - fix a mem leak.
https://bugzilla.gnome.org/show_bug.cgi?id=669372

Signed-off-by: Ravi Sankar Guntur <ravi.g@samsung.com>
2012-02-08 09:36:12 -05:00
Ravi Sankar Guntur
bd79c00537 glib/tests: fix memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=669372

Signed-off-by: Ravi Sankar Guntur <ravi.g@samsung.com>
2012-02-08 09:23:54 -05:00
Dan Winship
a8f516f61e glib/tests/option-context: remove unused tests
These tests were written, but then never used since it was decided to
add g_warnings() to goption.c in the cases they were supposed to be
testing. So anyway, just remove them.
2012-02-08 08:46:03 -05:00