platform/upstream/glib.git
12 years agoPlug a mem leak in g_environ_unsetenv
Christian Persch [Sun, 5 Feb 2012 15:00:31 +0000 (16:00 +0100)]
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.

12 years agoAdd G_GNUC_BEGIN/END_IGNORE_DEPRECATIONS
Dan Winship [Fri, 10 Feb 2012 13:49:17 +0000 (08:49 -0500)]
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

12 years agogobject: Use a destructor rather than g_atexit() for refcount debugging
Dan Winship [Fri, 10 Feb 2012 13:24:28 +0000 (08:24 -0500)]
gobject: Use a destructor rather than g_atexit() for refcount debugging

https://bugzilla.gnome.org/show_bug.cgi?id=669671

12 years agog_application_activate(): Fix typo in docs.
Murray Cumming [Wed, 15 Feb 2012 10:53:03 +0000 (11:53 +0100)]
g_application_activate(): Fix typo in docs.

12 years agoGKeyFile: fix annotation of g_key_file_load_from_data
Giovanni Campagna [Mon, 13 Feb 2012 15:42:44 +0000 (16:42 +0100)]
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

12 years agoGDataInputStream: don't segfault on async line reads
Giovanni Campagna [Mon, 13 Feb 2012 15:41:20 +0000 (16:41 +0100)]
GDataInputStream: don't segfault on async line reads

If an async line read fails, it returns NULL. In that case, we
must return NULL before validating the line, or we segfault.

https://bugzilla.gnome.org/show_bug.cgi?id=658484

12 years agoUpdated Belarusian translation.
Kasia Bondarava [Tue, 14 Feb 2012 15:28:32 +0000 (18:28 +0300)]
Updated Belarusian translation.

12 years agoUpdated Serbian translation
Мирослав Николић [Tue, 14 Feb 2012 10:01:33 +0000 (11:01 +0100)]
Updated Serbian translation

12 years agogasyncqueue: deprecate GTimeVal-based methods, add relative-delay ones
Dan Winship [Wed, 8 Feb 2012 13:26:36 +0000 (08:26 -0500)]
gasyncqueue: deprecate GTimeVal-based methods, add relative-delay ones

https://bugzilla.gnome.org/show_bug.cgi?id=669670

12 years agoUpdated Serbian translation
Мирослав Николић [Sun, 12 Feb 2012 19:12:30 +0000 (20:12 +0100)]
Updated Serbian translation

12 years agoUpdated Spanish translation
Daniel Mustieles [Sun, 12 Feb 2012 12:21:17 +0000 (13:21 +0100)]
Updated Spanish translation

12 years agoAdd a few more missing functions to the docs
Matthias Clasen [Sat, 11 Feb 2012 03:13:36 +0000 (22:13 -0500)]
Add a few more missing functions to the docs

12 years agoAdd g_settings_new_full to the docs
Matthias Clasen [Sat, 11 Feb 2012 03:08:47 +0000 (22:08 -0500)]
Add g_settings_new_full to the docs

12 years agoAdd g_test_undefined to the docs
Matthias Clasen [Sat, 11 Feb 2012 02:10:58 +0000 (21:10 -0500)]
Add g_test_undefined to the docs

12 years agoFix a parameter name mismatch
Matthias Clasen [Sat, 11 Feb 2012 02:09:39 +0000 (21:09 -0500)]
Fix a parameter name mismatch

gtk-doc gets unhappy if parameters aren't named the same in
headers, sources and doc comments.

12 years agoDrop menu markup docs
Matthias Clasen [Fri, 10 Feb 2012 23:06:10 +0000 (18:06 -0500)]
Drop menu markup docs

This does not exist anymore.

12 years agodocs: Fix some typos in gwin32inputstream
Javier Jardón [Fri, 10 Feb 2012 20:09:20 +0000 (20:09 +0000)]
docs: Fix some typos in gwin32inputstream

12 years agosocket/win32: flush pending read before signaling HUP
Marc-André Lureau [Fri, 10 Feb 2012 01:02:29 +0000 (02:02 +0100)]
socket/win32: flush pending read before signaling HUP

Unix and Windows gio GSocket behaves differently when the socket is
closed by the peer. On Unix, the client receives pending data before
receiving HUP. But on Windows, the HUP may come before, resulting in
unreliable and racy code. We should have same behaviour on all
platforms.

According to MSDN documentation: "an application should check for
remaining data upon receipt of FD_CLOSE to avoid any possibility of
losing data."

https://bugzilla.gnome.org/show_bug.cgi?id=669810

12 years agogio/tests: add /socket/close_graceful test
Marc-André Lureau [Fri, 10 Feb 2012 13:52:33 +0000 (14:52 +0100)]
gio/tests: add /socket/close_graceful test

Add a test to check that remaining data is read before the close
event is received.

https://bugzilla.gnome.org/show_bug.cgi?id=669810

12 years agoFix g_hash_table_foreach crash with NULL hash table
Christophe Fergeau [Thu, 9 Feb 2012 16:59:55 +0000 (17:59 +0100)]
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.

12 years agoDist gio/gconstructor_as_data.h
Chun-wei Fan [Fri, 10 Feb 2012 00:57:21 +0000 (08:57 +0800)]
Dist gio/gconstructor_as_data.h

This will avoid a dependency on a PERL installation for Visual Studio
builds.

Checked with mclasen in
https://bugzilla.gnome.org/show_bug.cgi?id=669538#c2

12 years agoBug 669538-glib-compile-resources.c: Include io.h on Windows
Chun-wei Fan [Tue, 7 Feb 2012 06:41:24 +0000 (14:41 +0800)]
Bug 669538-glib-compile-resources.c: Include io.h on Windows

This is needed for close() on Windows (Visual C++ specifically) so that
no C4013 (aka Implicit declaration of ...) errors/warnings will be emitted.

12 years agoAllow multiple --sourcedir options to glib-compile-resources
Richard Hughes [Thu, 9 Feb 2012 16:22:36 +0000 (16:22 +0000)]
Allow multiple --sourcedir options to glib-compile-resources

12 years agoGApplication: put non-unique apps on D-Bus
Ryan Lortie [Thu, 9 Feb 2012 17:15:49 +0000 (12:15 -0500)]
GApplication: put non-unique apps on D-Bus

For a number of reasons it might be useful to register the object paths
associated with a non-unique application so that the application can at
least field requests to its unique D-Bus name.

https://bugzilla.gnome.org/show_bug.cgi?id=647986

12 years agodocs: Fix gdbus-codegen example XML
David King [Tue, 7 Feb 2012 09:02:51 +0000 (09:02 +0000)]
docs: Fix gdbus-codegen example XML

Without the surrounding <node> tags, gdbus-codegen does not generate any
implementation for the interface described in the introspection XML.

https://bugzilla.gnome.org/show_bug.cgi?id=669544

12 years agogthread-win32: update for g_get_monotonic_time() changes
Dan Winship [Fri, 3 Feb 2012 17:14:06 +0000 (12:14 -0500)]
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

12 years agoglocalfile: fix error code when opening a directory on win32
Dan Winship [Fri, 3 Feb 2012 16:45:51 +0000 (11:45 -0500)]
glocalfile: fix error code when opening a directory on win32

g_file_read() was returning G_IO_ERROR_IS_DIRECTORY when you tried to
open a directory on unix, but G_IO_ERROR_PERMISSION_DENIED on win32.
Fix that, and add a test to tests/file.c

Pointed out on IRC by Paweł Forysiuk.

https://bugzilla.gnome.org/show_bug.cgi?id=669330

12 years agoGDBusProxy: Add G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES flag
David Zeuthen [Wed, 8 Feb 2012 17:46:04 +0000 (12:46 -0500)]
GDBusProxy: Add G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES flag

This is useful when using certain D-Bus services where the
PropertiesChanged signal does not include the property value such as
e.g. various systemd mechanisms, see e.g.

 https://bugs.freedesktop.org/show_bug.cgi?id=37632

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoRetrieve cwd and environ in local GApplicationCommandLine
Jesse van den Kieboom [Wed, 8 Feb 2012 16:13:34 +0000 (17:13 +0100)]
Retrieve cwd and environ in local GApplicationCommandLine

https://bugzilla.gnome.org/show_bug.cgi?id=669689

12 years agoglib/tests: mainloop - fix a mem leak.
Ravi Sankar Guntur [Mon, 6 Feb 2012 17:40:34 +0000 (23:10 +0530)]
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>
12 years agoglib/tests: fix memory leak
Ravi Sankar Guntur [Sat, 4 Feb 2012 18:12:41 +0000 (23:42 +0530)]
glib/tests: fix memory leak

https://bugzilla.gnome.org/show_bug.cgi?id=669372

Signed-off-by: Ravi Sankar Guntur <ravi.g@samsung.com>
12 years agogio: update .gitignore
Dan Winship [Wed, 8 Feb 2012 13:39:42 +0000 (08:39 -0500)]
gio: update .gitignore

12 years agoglib/tests/option-context: remove unused tests
Dan Winship [Wed, 8 Feb 2012 13:46:03 +0000 (08:46 -0500)]
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.

12 years agoconfig.h.win32.in: Add note on if_nametoindex
Chun-wei Fan [Wed, 8 Feb 2012 12:41:13 +0000 (20:41 +0800)]
config.h.win32.in: Add note on if_nametoindex

This explains the current disabling of HAVE_IF_NAMETOINDEX as we are
still supporting Windows XP.  This is expected to change when the patch
for XP support for if_nametoindex in accepted into master.

12 years agoconfig.h.win32.in: Updates
Chun-wei Fan [Wed, 8 Feb 2012 11:52:55 +0000 (19:52 +0800)]
config.h.win32.in: Updates

Make this more like the config.h.in template

12 years agoUpdate VS2010 property sheet
Chun-wei Fan [Wed, 8 Feb 2012 07:09:13 +0000 (15:09 +0800)]
Update VS2010 property sheet

Should be $(CopyDir) not $(OutDir) here for VS2010.  Oops :|

12 years agoUpdate VS property sheets
Chun-wei Fan [Wed, 8 Feb 2012 06:54:38 +0000 (14:54 +0800)]
Update VS property sheets

...To reflect the correct GIO headers to install

12 years agoglib-mkenums: fix handling of forward enum declarations
Dan Winship [Tue, 7 Feb 2012 15:54:22 +0000 (10:54 -0500)]
glib-mkenums: fix handling of forward enum declarations

Given

    typedef enum MyFoo MyFoo;

glib-mkenums would get confused, not notice the ";", and then keep
skipping lines until it found one that started with a "{", possibly
even going into the next file.

Fix it to just ignore those lines instead (and also, to error out if
it hits eof while parsing an enum).

https://bugzilla.gnome.org/show_bug.cgi?id=669595

12 years agodocs: Add win32 gio specific api to the docs
Javier Jardón [Tue, 7 Feb 2012 14:37:26 +0000 (15:37 +0100)]
docs: Add win32 gio specific api to the docs

Reported by Lethalman on IRC

12 years agoAdd Visual C++ 2010 projects to compile GResource tools
Chun-wei Fan [Tue, 7 Feb 2012 09:05:22 +0000 (17:05 +0800)]
Add Visual C++ 2010 projects to compile GResource tools

Added projects to compile the glib-compile-resources and gresource(-tool)
utility programs during the Visual C++ 2010 build process, "install"
the resulting binaries upon successful compilation, and dist the new
.vcxproj and .vcxproj.filters files.

Also updated the property sheet and "install" project to make sure the new
.exe's are indeed "installed" and removed from the "install" project the
dependency on the testglib project as testglib is not an exhausive test on
GLib and people might want to make that project compile different test
programs as they might need.

Just wondering: I have updated the property sheet to create the
gconstructor_as_data.h header for glib-compile-resources, but is it better
to dist that generated header instead as the VS 2008/2010 projects will
depend on a working installation of PERL on Windows?

12 years agoUpdate Visual C++ 2008 projects
Chun-wei Fan [Tue, 7 Feb 2012 08:31:53 +0000 (16:31 +0800)]
Update Visual C++ 2008 projects

Make the "install" project depend on the glib-compile-resources gresource
projects so that these tools will be indeed installed.  Missed that in my
last commit-oops.

Also make the "install" project not to depend on the testglib project as:
-the test program in the project is not an exhausive test of the GLib
 libraries
-One may want to use the project to compile different test program(s), so
 it might be better to keep the project but not "install" the resulting
 .exe

12 years agoAdd Visual C++ 2008 projects for GResource tools
Chun-wei Fan [Tue, 7 Feb 2012 06:37:57 +0000 (14:37 +0800)]
Add Visual C++ 2008 projects for GResource tools

Add projects to build the glib-compile-resources and gresource(-tool)
utilities, and "install" these tools upon successful compilation, and dist
the new projects.

One piece of note: will it be better to dist gconstructor_as_data.h instead
of generating it in the VS build process (I generated it in the property
sheet update in this commit)?

Visual C++ 2010 projects will follow shortly.

12 years agodocs: Fix typo
Christian Persch [Mon, 6 Feb 2012 21:33:19 +0000 (22:33 +0100)]
docs: Fix typo

12 years agogtimezone: consider a leading : in TZ environment variable
Giovanni Campagna [Wed, 16 Nov 2011 23:52:59 +0000 (00:52 +0100)]
gtimezone: consider a leading : in TZ environment variable

When set to represent a zoneinfo file, TZ may start with :, therefore
glib needs to check it and ignore the first char when building the
resulting filename, or it won't be found.
Also, the path could be absolute, in which case it is wrong to
append /usr/share/timezone

https://bugzilla.gnome.org/show_bug.cgi?id=664237

12 years agoUpdated Telugu Translation
Swecha Localization Team [Mon, 6 Feb 2012 11:45:14 +0000 (17:15 +0530)]
Updated Telugu Translation

12 years agoUpdated Galician translations
Fran Diéguez [Mon, 6 Feb 2012 01:54:44 +0000 (02:54 +0100)]
Updated Galician translations

12 years agoRevert "Plug a mem leak in g_environ_unsetenv"
Christian Persch [Sun, 5 Feb 2012 19:00:16 +0000 (20:00 +0100)]
Revert "Plug a mem leak in g_environ_unsetenv"

This reverts commit 2f4b46e3783b04cddcb2622a57b2a8e692cff68a, which was
pushed accidentally.

12 years agoresources: Consolidate creation of GResource into one place
Christian Persch [Sun, 5 Feb 2012 18:55:45 +0000 (19:55 +0100)]
resources: Consolidate creation of GResource into one place

12 years agoresources: tests: Plug a mem leak
Christian Persch [Sun, 5 Feb 2012 15:44:10 +0000 (16:44 +0100)]
resources: tests: Plug a mem leak

==1265== 84 (8 direct, 76 indirect) bytes in 1 blocks are definitely lost in loss record 793 of 827
==1265==    at 0x4029467: calloc (vg_replace_malloc.c:467)
==1265==    by 0x408479B: standard_calloc (gmem.c:104)
==1265==    by 0x4084846: g_malloc0 (gmem.c:189)
==1265==    by 0x4084B2D: g_malloc0_n (gmem.c:385)
==1265==    by 0x4228A98: g_resource_load (gresource.c:253)
==1265==    by 0x804A56D: test_resource_registred (resources.c:198)

12 years agoresources: tests: Plug a mem leak
Christian Persch [Sun, 5 Feb 2012 15:39:51 +0000 (16:39 +0100)]
resources: tests: Plug a mem leak

==509== 700 (20 direct, 680 indirect) bytes in 1 blocks are definitely lost in loss record 828 of 837
==509==    at 0x402AD89: malloc (vg_replace_malloc.c:236)
==509==    by 0x4084724: standard_malloc (gmem.c:85)
==509==    by 0x40847C7: g_malloc (gmem.c:159)
==509==    by 0x409B1E1: g_slice_alloc (gslice.c:1003)
==509==    by 0x405396B: g_bytes_new_with_free_func (gbytes.c:173)
==509==    by 0x405390D: g_bytes_new_take (gbytes.c:122)
==509==    by 0x804A48C: test_resource_data (resources.c:174)

12 years agoresources: tests: Plug a mem leak
Christian Persch [Sun, 5 Feb 2012 15:38:36 +0000 (16:38 +0100)]
resources: tests: Plug a mem leak

==29204== 11,456 (84 direct, 11,372 indirect) bytes in 1 blocks are definitely lost in loss record 859 of 861
==29204==    at 0x402AD89: malloc (vg_replace_malloc.c:236)
==29204==    by 0x4084724: standard_malloc (gmem.c:85)
==29204==    by 0x40847C7: g_malloc (gmem.c:159)
==29204==    by 0x409B1E1: g_slice_alloc (gslice.c:1003)
==29204==    by 0x409B227: g_slice_alloc0 (gslice.c:1029)
==29204==    by 0x41936CF: g_type_create_instance (gtype.c:1872)
==29204==    by 0x417CCC9: g_object_constructor (gobject.c:1839)
==29204==    by 0x417C6F4: g_object_newv (gobject.c:1703)
==29204==    by 0x417CC5A: g_object_new_valist (gobject.c:1820)
==29204==    by 0x417C1DB: g_object_new (gobject.c:1535)
==29204==    by 0x41E5E29: g_converter_input_stream_new (gconverterinputstream.c:204)
==29204==    by 0x4228D38: g_resource_open_stream (gresource.c:363)

12 years agoresources: Init refcount to 1
Christian Persch [Sun, 5 Feb 2012 15:37:36 +0000 (16:37 +0100)]
resources: Init refcount to 1

This bug was exposed by fixing the following leak in the resources test:

==29204== 11,456 (84 direct, 11,372 indirect) bytes in 1 blocks are definitely lost in loss record 859 of 861
==29204==    at 0x402AD89: malloc (vg_replace_malloc.c:236)
==29204==    by 0x4084724: standard_malloc (gmem.c:85)
==29204==    by 0x40847C7: g_malloc (gmem.c:159)
==29204==    by 0x409B1E1: g_slice_alloc (gslice.c:1003)
==29204==    by 0x409B227: g_slice_alloc0 (gslice.c:1029)
==29204==    by 0x41936CF: g_type_create_instance (gtype.c:1872)
==29204==    by 0x417CCC9: g_object_constructor (gobject.c:1839)
==29204==    by 0x417C6F4: g_object_newv (gobject.c:1703)
==29204==    by 0x417CC5A: g_object_new_valist (gobject.c:1820)
==29204==    by 0x417C1DB: g_object_new (gobject.c:1535)
==29204==    by 0x41E5E29: g_converter_input_stream_new (gconverterinputstream.c:204)
==29204==    by 0x4228D38: g_resource_open_stream (gresource.c:363)

12 years agoresources: Plug a mem leak
Christian Persch [Sun, 5 Feb 2012 15:18:34 +0000 (16:18 +0100)]
resources: Plug a mem leak

==29204== 7,192 (76 direct, 7,116 indirect) bytes in 1 blocks are definitely lost in loss record 855 of 861
==29204==    at 0x402AD89: malloc (vg_replace_malloc.c:236)
==29204==    by 0x4084724: standard_malloc (gmem.c:85)
==29204==    by 0x40847C7: g_malloc (gmem.c:159)
==29204==    by 0x409B1E1: g_slice_alloc (gslice.c:1003)
==29204==    by 0x409B227: g_slice_alloc0 (gslice.c:1029)
==29204==    by 0x41936CF: g_type_create_instance (gtype.c:1872)
==29204==    by 0x417CCC9: g_object_constructor (gobject.c:1839)
==29204==    by 0x417C6F4: g_object_newv (gobject.c:1703)
==29204==    by 0x417CC5A: g_object_new_valist (gobject.c:1820)
==29204==    by 0x417C1DB: g_object_new (gobject.c:1535)
==29204==    by 0x424E815: g_zlib_decompressor_new (gzlibdecompressor.c:270)
==29204==    by 0x4228DD8: g_resource_lookup_data (gresource.c:422)

12 years agoresources: tests: Plug a mem leak
Christian Persch [Sun, 5 Feb 2012 15:16:37 +0000 (16:16 +0100)]
resources: tests: Plug a mem leak

==28778== 700 (20 direct, 680 indirect) bytes in 1 blocks are definitely lost in loss record 842 of 863
==28778==    at 0x402AD89: malloc (vg_replace_malloc.c:236)
==28778==    by 0x4084724: standard_malloc (gmem.c:85)
==28778==    by 0x40847C7: g_malloc (gmem.c:159)
==28778==    by 0x409B1E1: g_slice_alloc (gslice.c:1003)
==28778==    by 0x405396B: g_bytes_new_with_free_func (gbytes.c:173)
==28778==    by 0x405390D: g_bytes_new_take (gbytes.c:122)
==28778==    by 0x804C2B1: test_uri_query_info (resources.c:435)

12 years agoresources: tests: Plug a mem leak
Christian Persch [Sun, 5 Feb 2012 15:14:21 +0000 (16:14 +0100)]
resources: tests: Plug a mem leak

==28318== 38 (12 direct, 26 indirect) bytes in 1 blocks are definitely lost in loss record 613 of 865
==28318==    at 0x402AD89: malloc (vg_replace_malloc.c:236)
==28318==    by 0x4084724: standard_malloc (gmem.c:85)
==28318==    by 0x40847C7: g_malloc (gmem.c:159)
==28318==    by 0x4084AB4: g_malloc_n (gmem.c:361)
==28318==    by 0x4229599: g_resources_enumerate_children (gresource.c:806)
==28318==    by 0x804B39E: test_resource_registred (resources.c:283)

12 years agoresources: tests: Plug a mem leak
Christian Persch [Sun, 5 Feb 2012 15:12:23 +0000 (16:12 +0100)]
resources: tests: Plug a mem leak

==27820== 31 bytes in 1 blocks are definitely lost in loss record 587 of 866
==27820==    at 0x402AD89: malloc (vg_replace_malloc.c:236)
==27820==    by 0x4084724: standard_malloc (gmem.c:85)
==27820==    by 0x40847C7: g_malloc (gmem.c:159)
==27820==    by 0x4084AB4: g_malloc_n (gmem.c:361)
==27820==    by 0x409D6A1: g_strdup (gstrfuncs.c:356)
==27820==    by 0x4069FF7: g_get_current_dir (gfileutils.c:2544)
==27820==    by 0x804BCA7: test_resource_module (resources.c:370)

12 years agoresources: Plug a mem leak
Christian Persch [Sun, 5 Feb 2012 15:10:48 +0000 (16:10 +0100)]
resources: Plug a mem leak

==27020== 44 (24 direct, 20 indirect) bytes in 1 blocks are definitely lost in loss record 684 of 936
==27020==    at 0x402AD89: malloc (vg_replace_malloc.c:236)
==27020==    by 0x4084724: standard_malloc (gmem.c:85)
==27020==    by 0x40847C7: g_malloc (gmem.c:159)
==27020==    by 0x409B1E1: g_slice_alloc (gslice.c:1003)
==27020==    by 0x40BC038: g_variant_get_child_value (gvariant-core.c:969)
==27020==    by 0x40B5277: g_variant_get_variant (gvariant.c:749)
==27020==    by 0x4273182: gvdb_table_value_from_item (gvdb-reader.c:478)
==27020==    by 0x42731E8: gvdb_table_get_value (gvdb-reader.c:509)
==27020==    by 0x4228B36: do_lookup (gresource.c:280)
==27020==    by 0x4228F56: g_resource_get_info (gresource.c:492)

12 years agoresources: Plug a mem leak
Christian Persch [Sun, 5 Feb 2012 15:08:10 +0000 (16:08 +0100)]
resources: Plug a mem leak

==26427== 24 bytes in 1 blocks are definitely lost in loss record 608 of 965
==26427==    at 0x402AD89: malloc (vg_replace_malloc.c:236)
==26427==    by 0x4084724: standard_malloc (gmem.c:85)
==26427==    by 0x40847C7: g_malloc (gmem.c:159)
==26427==    by 0x409B1E1: g_slice_alloc (gslice.c:1003)
==26427==    by 0x40BC038: g_variant_get_child_value (gvariant-core.c:969)
==26427==    by 0x40BA89F: g_variant_valist_get (gvariant.c:4482)
==26427==    by 0x40BAC23: g_variant_get_va (gvariant.c:4681)
==26427==    by 0x40BAB29: g_variant_get (gvariant.c:4633)
==26427==    by 0x4228BA5: do_lookup (gresource.c:293)
==26427==    by 0x4228F51: g_resource_get_info (gresource.c:493)

12 years agoPlug a mem leak in g_environ_unsetenv
Christian Persch [Sun, 5 Feb 2012 15:00:31 +0000 (16:00 +0100)]
Plug a mem leak in g_environ_unsetenv

==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.

12 years agoBack to odd
Matthias Clasen [Sun, 5 Feb 2012 03:54:58 +0000 (22:54 -0500)]
Back to odd

12 years ago2.31.16 2.31.16
Matthias Clasen [Sat, 4 Feb 2012 23:43:13 +0000 (18:43 -0500)]
2.31.16

12 years agoUpdates
Matthias Clasen [Sat, 4 Feb 2012 16:51:45 +0000 (11:51 -0500)]
Updates

12 years agofix memory leak in g_bookmark_file_parse()
Ravi Sankar Guntur [Fri, 3 Feb 2012 18:44:56 +0000 (00:14 +0530)]
fix memory leak in g_bookmark_file_parse()

https://bugzilla.gnome.org/show_bug.cgi?id=669334

Signed-off-by: Ravi Sankar Guntur <ravi.g@samsung.com>
12 years agoUpdated Norwegian bokmål translation
Kjartan Maraas [Sat, 4 Feb 2012 11:32:51 +0000 (12:32 +0100)]
Updated Norwegian bokmål translation

12 years agogio/tests/file: use g_file_new_tmp()
Dan Winship [Fri, 3 Feb 2012 16:29:46 +0000 (11:29 -0500)]
gio/tests/file: use g_file_new_tmp()

Rather than misusing g_file_open_tmp(), misuse g_file_new_tmp()
instead. Progress! (Also, gets rid of a compile warning about close()
on win32.)

12 years agogio/tests/socket-common.c: add a missing #ifdef G_OS_UNIX
Dan Winship [Fri, 3 Feb 2012 17:08:40 +0000 (12:08 -0500)]
gio/tests/socket-common.c: add a missing #ifdef G_OS_UNIX

12 years agogioenums.h: clean up a few GIOErrorEnum descriptions
Dan Winship [Fri, 3 Feb 2012 16:39:27 +0000 (11:39 -0500)]
gioenums.h: clean up a few GIOErrorEnum descriptions

12 years agoUpdated Spanish translation
Daniel Mustieles [Fri, 3 Feb 2012 15:29:28 +0000 (16:29 +0100)]
Updated Spanish translation

12 years agoFix warning to refer to to-pixdata, not xmllint
Alexander Larsson [Fri, 3 Feb 2012 14:11:23 +0000 (15:11 +0100)]
Fix warning to refer to to-pixdata, not xmllint

12 years agoFix GResourceFile get_parent()
Alexander Larsson [Fri, 3 Feb 2012 14:05:03 +0000 (15:05 +0100)]
Fix GResourceFile get_parent()

This was erronously losing the last char.

12 years agoresource: tests: Use g_assert_cmp[u]int
Christian Persch [Wed, 1 Feb 2012 13:59:22 +0000 (14:59 +0100)]
resource: tests: Use g_assert_cmp[u]int

... instead of just g_assert(), so when the test does fail, one immediately
can see the actual value the variable had.

12 years agoresources: compiler: Fix entity processing of xml-stripblanks
Christian Persch [Tue, 31 Jan 2012 17:10:55 +0000 (18:10 +0100)]
resources: compiler: Fix entity processing of xml-stripblanks

Preserve entities instead of replacing them!

Bug #669173.

12 years agoresources: compiler: Make to-pixbuf failure fatal
Christian Persch [Tue, 31 Jan 2012 17:01:25 +0000 (18:01 +0100)]
resources: compiler: Make to-pixbuf failure fatal

Bug #669123.

12 years agogsettings tool: fix a memory error
Ryan Lortie [Thu, 2 Feb 2012 15:48:11 +0000 (10:48 -0500)]
gsettings tool: fix a memory error

8852d4e9a08e7fbc9df7fb99a54b112f5049ee19 introduced a memory error by
taking the type of a GVariant, freeing the GVariant and using the type
after the free.

This delays the free until after we've used the type.

https://bugzilla.gnome.org/show_bug.cgi?id=669253

12 years agogio: Convert data-to-c.c to perl
Kalev Lember [Wed, 1 Feb 2012 16:44:15 +0000 (18:44 +0200)]
gio: Convert data-to-c.c to perl

Helper scripts in C can be problematic for cross compiling: the compiler
produces executables for the target platform, which the host is usually
unable to run.

https://bugzilla.gnome.org/show_bug.cgi?id=669224

12 years agodocs: Clarify GSocketClient reuse policy
Benjamin Otte [Wed, 1 Feb 2012 15:25:01 +0000 (16:25 +0100)]
docs: Clarify GSocketClient reuse policy

12 years agogio/tests: Fix out-of-source build
Kalev Lember [Wed, 1 Feb 2012 13:48:28 +0000 (15:48 +0200)]
gio/tests: Fix out-of-source build

The glib-compile-resources --generate-dependencies call was failing,
although not stopping the build.

Failed to open file 'test2.gresource.xml': No such file or directory
Failed to open file 'test3.gresource.xml': No such file or directory
Failed to open file 'test4.gresource.xml': No such file or directory
Failed to open file 'test.gresource.xml': No such file or directory

12 years agogio.symbols: Add g_static_* symbols
Kalev Lember [Wed, 1 Feb 2012 08:09:57 +0000 (10:09 +0200)]
gio.symbols: Add g_static_* symbols

... which were added in b79cfda49c.

12 years agogresource-tool: include sys/mman.h conditionally
Kalev Lember [Wed, 1 Feb 2012 07:10:29 +0000 (09:10 +0200)]
gresource-tool: include sys/mman.h conditionally

It's only needed for code guarded by HAVE_LIBELF, so ifdef the include
as well.

12 years agoAdd a test to show that GMarkup properly handles > in content
Matthias Clasen [Wed, 1 Feb 2012 03:00:45 +0000 (22:00 -0500)]
Add a test to show that GMarkup properly handles > in content

12 years agoresources: Add to-pixdata preprocessing option
Alexander Larsson [Tue, 31 Jan 2012 15:07:09 +0000 (16:07 +0100)]
resources: Add to-pixdata preprocessing option

12 years agoMake constructor-based resource registration malloc free
Alexander Larsson [Tue, 31 Jan 2012 09:51:44 +0000 (10:51 +0100)]
Make constructor-based resource registration malloc free

We need to do this because constructors run before main() and
thus before any call to g_mem_set_vtable, making it impossible to
use that function if constructors call g_malloc.

We do this by making the constructors just register the static data
for lazy registration, doing the lazy registration when using
the global resource set.

12 years agoresources: Minor fixes to the docs
Alexander Larsson [Tue, 31 Jan 2012 09:51:23 +0000 (10:51 +0100)]
resources: Minor fixes to the docs

12 years agoBump version number
Matthias Clasen [Mon, 30 Jan 2012 23:47:31 +0000 (18:47 -0500)]
Bump version number

12 years ago2.31.14 2.31.14
Matthias Clasen [Mon, 30 Jan 2012 23:46:18 +0000 (18:46 -0500)]
2.31.14

12 years agoFix distclean
Matthias Clasen [Mon, 30 Jan 2012 23:45:45 +0000 (18:45 -0500)]
Fix distclean

12 years agoDist gconstructor.h
Matthias Clasen [Mon, 30 Jan 2012 22:54:33 +0000 (17:54 -0500)]
Dist gconstructor.h

12 years agoEmit meaningful error messages
Matthias Clasen [Mon, 30 Jan 2012 22:53:48 +0000 (17:53 -0500)]
Emit meaningful error messages

That is useful, even if this is only an internal tool.
I have been scratching my head why this tool would
break distcheck...

12 years agoFix builddir != src builds
Matthias Clasen [Mon, 30 Jan 2012 22:26:33 +0000 (17:26 -0500)]
Fix builddir != src builds

12 years agoSome more documentation fixes
Matthias Clasen [Mon, 30 Jan 2012 21:23:01 +0000 (16:23 -0500)]
Some more documentation fixes

12 years agoAssorted documentation fixes
Matthias Clasen [Mon, 30 Jan 2012 20:59:38 +0000 (15:59 -0500)]
Assorted documentation fixes

12 years agoDrop menu markup functions from API docs
Matthias Clasen [Mon, 30 Jan 2012 20:37:43 +0000 (15:37 -0500)]
Drop menu markup functions from API docs

12 years agoFix doc syntax
Matthias Clasen [Mon, 30 Jan 2012 20:37:28 +0000 (15:37 -0500)]
Fix doc syntax

12 years agoMove pragmas out of function body
Matthias Clasen [Mon, 30 Jan 2012 20:26:15 +0000 (15:26 -0500)]
Move pragmas out of function body

It seems that older gcc does not like pragmas inside functions.

12 years agoMove pragmas out of function body
Matthias Clasen [Mon, 30 Jan 2012 20:25:09 +0000 (15:25 -0500)]
Move pragmas out of function body

It seems that older gcc does not like pragmas inside functions.

12 years agoSilence another deprecation warning
Matthias Clasen [Mon, 30 Jan 2012 19:21:03 +0000 (14:21 -0500)]
Silence another deprecation warning

12 years agoSilence a deprecation warning
Matthias Clasen [Mon, 30 Jan 2012 19:18:07 +0000 (14:18 -0500)]
Silence a deprecation warning

Advantage of the new deprecation handling: there's pragmas
to shut them up locally.

12 years agoRemove a check that triggers deprecation warnings
Matthias Clasen [Mon, 30 Jan 2012 19:06:22 +0000 (14:06 -0500)]
Remove a check that triggers deprecation warnings

12 years agoUpdates
Matthias Clasen [Mon, 30 Jan 2012 18:38:44 +0000 (13:38 -0500)]
Updates

12 years agoMove constructor macros to an internal header and into generated code
Alexander Larsson [Mon, 30 Jan 2012 15:57:54 +0000 (16:57 +0100)]
Move constructor macros to an internal header and into generated code

With this we're not longer exporting the constructor headers, which means
we're not tying ourselves to a macro that might need special tweaking on
a compiler-by-compiler basis.