Commit Graph

11818 Commits

Author SHA1 Message Date
Chun-wei Fan
bbda744c0e Update VS property sheets
...To reflect the correct GIO headers to install
2012-02-08 14:54:38 +08:00
Dan Winship
f049262a61 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
2012-02-07 13:32:22 -05:00
Javier Jardón
808346c6ab docs: Add win32 gio specific api to the docs
Reported by Lethalman on IRC
2012-02-07 16:06:04 +01:00
Chun-wei Fan
46e2df316d 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?
2012-02-07 17:05:22 +08:00
Chun-wei Fan
2b400d853e 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
2012-02-07 16:31:53 +08:00
Chun-wei Fan
d858cd3047 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.
2012-02-07 14:37:57 +08:00
Christian Persch
867f554ea5 docs: Fix typo 2012-02-06 22:33:19 +01:00
Giovanni Campagna
1faed130dc 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
2012-02-06 17:26:30 +01:00
Swecha Localization Team
b98b63187a Updated Telugu Translation 2012-02-06 17:15:14 +05:30
Fran Diéguez
bd08970349 Updated Galician translations 2012-02-06 02:54:44 +01:00
Christian Persch
7e9aed94de Revert "Plug a mem leak in g_environ_unsetenv"
This reverts commit 2f4b46e378, which was
pushed accidentally.
2012-02-05 20:00:16 +01:00
Christian Persch
30e0a1beac resources: Consolidate creation of GResource into one place 2012-02-05 19:57:10 +01:00
Christian Persch
04df4d45a4 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)
2012-02-05 19:57:10 +01:00
Christian Persch
0ebb6339d1 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)
2012-02-05 19:57:10 +01:00
Christian Persch
6789ab2294 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)
2012-02-05 19:57:10 +01:00
Christian Persch
877fe6fb52 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)
2012-02-05 19:57:10 +01:00
Christian Persch
30e9cccb85 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)
2012-02-05 19:57:10 +01:00
Christian Persch
e194a9032f 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)
2012-02-05 19:57:10 +01:00
Christian Persch
108e11875e 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)
2012-02-05 19:57:10 +01:00
Christian Persch
74c262a8bd 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)
2012-02-05 19:57:09 +01:00
Christian Persch
ffe7a3293f 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)
2012-02-05 19:57:09 +01:00
Christian Persch
fa37057169 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)
2012-02-05 19:57:09 +01:00
Christian Persch
2f4b46e378 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.
2012-02-05 19:57:09 +01:00
Matthias Clasen
26a5af83d4 Back to odd 2012-02-04 22:54:58 -05:00
Matthias Clasen
d6a4369089 2.31.16 2012-02-04 18:43:13 -05:00
Matthias Clasen
439c8365da Updates 2012-02-04 11:51:45 -05:00
Ravi Sankar Guntur
59a0134de8 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>
2012-02-04 10:01:19 -05:00
Kjartan Maraas
7e3eeb2ba1 Updated Norwegian bokmål translation 2012-02-04 12:32:51 +01:00
Dan Winship
f43565c822 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.)
2012-02-03 13:01:19 -05:00
Dan Winship
cc4c1e89f4 gio/tests/socket-common.c: add a missing #ifdef G_OS_UNIX 2012-02-03 12:58:53 -05:00
Dan Winship
d22c36cf00 gioenums.h: clean up a few GIOErrorEnum descriptions 2012-02-03 12:49:48 -05:00
Daniel Mustieles
e9caa11aa5 Updated Spanish translation 2012-02-03 16:29:28 +01:00
Alexander Larsson
3b8ba958f5 Fix warning to refer to to-pixdata, not xmllint 2012-02-03 15:11:23 +01:00
Alexander Larsson
ac800fa8fe Fix GResourceFile get_parent()
This was erronously losing the last char.
2012-02-03 15:05:43 +01:00
Christian Persch
260a9cc290 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.
2012-02-02 23:44:44 +01:00
Christian Persch
cb1dd2143d resources: compiler: Fix entity processing of xml-stripblanks
Preserve entities instead of replacing them!

Bug #669173.
2012-02-02 23:44:40 +01:00
Christian Persch
296a2a72c6 resources: compiler: Make to-pixbuf failure fatal
Bug #669123.
2012-02-02 23:44:38 +01:00
Ryan Lortie
387ed239e2 gsettings tool: fix a memory error
8852d4e9a0 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
2012-02-02 10:53:50 -05:00
Kalev Lember
552b815365 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
2012-02-02 16:22:42 +01:00
Benjamin Otte
053b011ccc docs: Clarify GSocketClient reuse policy 2012-02-01 16:25:23 +01:00
Kalev Lember
a60f475b36 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
2012-02-01 15:53:55 +02:00
Kalev Lember
9cf678ed22 gio.symbols: Add g_static_* symbols
... which were added in b79cfda49c.
2012-02-01 15:53:54 +02:00
Kalev Lember
0bb201348f gresource-tool: include sys/mman.h conditionally
It's only needed for code guarded by HAVE_LIBELF, so ifdef the include
as well.
2012-02-01 15:53:54 +02:00
Matthias Clasen
3758b41e08 Add a test to show that GMarkup properly handles > in content 2012-01-31 22:02:22 -05:00
Alexander Larsson
47aa8c43e8 resources: Add to-pixdata preprocessing option 2012-01-31 16:07:09 +01:00
Alexander Larsson
b79cfda49c 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.
2012-01-31 10:51:44 +01:00
Alexander Larsson
2496c8b53e resources: Minor fixes to the docs 2012-01-31 10:51:23 +01:00
Matthias Clasen
8ab7ed8ffc Bump version number 2012-01-30 18:47:31 -05:00
Matthias Clasen
d332bdcc58 2.31.14 2012-01-30 18:46:18 -05:00
Matthias Clasen
e6713ec810 Fix distclean 2012-01-30 18:46:11 -05:00