Commit Graph

11653 Commits

Author SHA1 Message Date
Benjamin Otte
a6e149e41f array: return_if_fail() if element size is 0
This is particular useful for:
  g_array_new (sizeof (MyStruct), FALSE, FALSE);
because the correct incantation is
  g_array_new (FALSE, FALSE, sizeof (MyStruct));
and these warnings will trigger in the first situation.
2012-01-14 01:15:16 +01:00
Benjamin Otte
9d52243790 values: Use v_pointer for g_value_set_gtype()
... and g_value_get_gtype(). G_TYPE_GTYPE is a pointer type, so it's
values should use the v_pointer member. This is especially true, because
the value collectors from varargs in gvaluecollector.h use that, too.

This should only cause issues when sizeof(glong) != sizeof(gpointer),
and I'm not aware of any such platform. Maybe win64?
2012-01-14 01:15:16 +01:00
Rico Tzschichholz
86cd3018e0 gio/tests: add some missing files to EXTRA_DIST 2012-01-13 23:48:12 +01:00
Rico Tzschichholz
e3fe256692 gio: Fix for -Wformat-security 2012-01-13 23:18:01 +01:00
Rico Tzschichholz
8735f53ae4 tests: Fix build failure of resources by linking against libgmodule-2.0.la 2012-01-13 22:35:44 +01:00
Piotr Drąg
0ed77c4fdd Updated POTFILES.in 2012-01-13 21:11:03 +01:00
Alexander Larsson
056cec779a Add GResource functions to gio.symbols 2012-01-13 17:12:57 +01:00
Alexander Larsson
186e2d2078 Add GLIB_COMPILE_RESOURCES to glib m4 macros 2012-01-13 17:12:57 +01:00
Alexander Larsson
ac51c338ed Add glib_compile_resources variable to the gio pc file 2012-01-13 17:12:57 +01:00
Alexander Larsson
c7dfea30b3 Add documentation for GResource 2012-01-13 17:12:57 +01:00
Alexander Larsson
e041843b3e Support resource:/// uris 2012-01-13 17:12:57 +01:00
Alexander Larsson
75439298f8 Add tests for GResource 2012-01-13 17:12:53 +01:00
Alexander Larsson
827657491d Initial version of glib-compile-resources
This is the basic utility to create resource files, either binary
versions or source files that can be compiled into your app.
2012-01-13 17:12:50 +01:00
Alexander Larsson
b87cf49163 Initial version of GResource
GResource is a bundle of files combined into a single binary blog.
The API lets you access the files the resource contains by
using resource paths. You can also register resources with a
global list and access these globally in a merged resource namespace.

The normal way this is used is to link in the resources into your
application/library and have it be automatically registred.

Resources are compiled from an xml description using
glib-compile-resources.
2012-01-13 17:12:45 +01:00
Alexander Larsson
d85b722734 Merge remote-tracking branch 'gvdb/master' 2012-01-13 16:12:56 +01:00
Alexander Larsson
9ef4554a0b Add macros to handle constructor functions on the compilers that support it
This is only supported on some compilers, so we define G_HAS_CONSTRUCTORS
when it is supported. However, when it is supported we guarantee that
both constructors and destructors work, in executables as well as shared
libraries (including runtime unloading of shared libraries).

Usage is a bit unorthodox, as some compilers need to use #pragma to
implement constructors, and #pragma can't be used in macros.

The canonical way to use this:

  #ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
  #pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(my_constructor)
  #endif
  G_DEFINE_CONSTRUCTOR(my_constructor)

  static void my_constructor (void)
  {
    ...

  #ifdef G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA
  #pragma G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(my_destructor)
  #endif
  G_DEFINE_DESTRUCTOR(my_destructor)

  static void my_destructor (void)
  {
    ...
2012-01-13 16:02:47 +01:00
Alexander Larsson
73acf01618 Support creating a GvdbReader from data
This is needed for the glib resource work.
2012-01-13 15:59:56 +01:00
Murray Cumming
d1f6300363 Docs: Changed can not to cannot.
This is a backport from the glib commit 30fdc1a799
2012-01-13 09:23:06 +01:00
Yaron Shahrabani
3db6241b12 Updated Hebrew translation. 2012-01-13 09:38:35 +02:00
Javier Jardón
9e732ab0ea docs/gobject/tutorial: Use g_object_class_install_properties 2012-01-12 14:13:07 +00:00
Evan Nemerson
c3d6595f5a GIO: add lots of annotations for Vala bindings
https://bugzilla.gnome.org/show_bug.cgi?id=667447
2012-01-11 15:50:08 -05:00
Philip Withnall
e98f17e5cf Bug 666700 — Add some missing (allow-none) annotations
Add some missing (allow-none) annotations to GContentType, GIcon and
GHashTable methods.

Closes: bgo#666700
2012-01-11 20:48:29 +00:00
Matthias Clasen
f8843a0feb Back to odd 2012-01-10 00:40:14 -05:00
Matthias Clasen
4a016d82f1 2.31.8 2012-01-10 00:39:20 -05:00
Matthias Clasen
93849185ca Updates 2012-01-09 23:23:27 -05:00
Matthias Clasen
00c00e2f3f Add G_FILE_ATTRIBUTE_FILESYSTEM_USED to get exact used space
This is implemented by with statfs_buffer.f_bavail (free blocks
for unprivileged users) as a default way to retrieve real free space.
Based on a patch by Marcus Carlson, bug 625751.
2012-01-09 21:49:08 -05:00
Matthias Clasen
31960257a6 Make glocalfile.c more readable
The many nested ifdefs here really deserve some annotations.
Based on a patch by Marcus Carlson, bug 625751.
2012-01-09 21:35:13 -05:00
Ravi Sankar Guntur
fd7e443838 add g_queue_free_full to glib-sections.txt
Signed-off-by: Ravi Sankar Guntur <ravi.g@samsung.com>

https://bugzilla.gnome.org/show_bug.cgi?id=667331
2012-01-09 19:27:41 -05:00
Ravi Sankar Guntur
0ed2cdb0d9 Use g_queue_free_full() convenience function.
https://bugzilla.gnome.org/show_bug.cgi?id=667331

Signed-off-by: Ravi Sankar Guntur <ravi.g@samsung.com>
2012-01-09 19:27:39 -05:00
Ihar Hrachyshka
a76d85de50 Updated Belarusian translation. 2012-01-10 01:00:29 +03:00
Matthias Clasen
ddf9633d95 fix a compiler warning 2012-01-09 15:27:07 -05:00
Matthias Clasen
39dc681fc7 Realign the hash set example with added api
Change the name of set_insert to set_add, to better match the
newly added g_hash_table_add.
2012-01-09 15:23:25 -05:00
Ryan Lortie
875ffc41b7 drop debian/ directory 2012-01-09 14:28:25 +01:00
Dan Vrátil
7678b10703 Fix GHashTable GDB pretty printing (bug #667420) 2012-01-09 09:29:20 +01:00
Alexander Shopov
82740adc61 Updated Bulgarian translation 2012-01-08 16:48:13 +02:00
Jasper St. Pierre
d141940bc6 gthread-posix: Remove misleading documentation comments
g_thread_init() has done nothing since 2.32, so while the function
still can be used if "g_thread_init() has not yet been called",
it won't do nothing in that case, it will just perform normally.
2012-01-06 14:41:08 -05:00
Jasper St. Pierre
021e116f05 gbacktrace: g_get_prgname () isn't called for a NULL argument
https://bugzilla.gnome.org/show_bug.cgi?id=658871
2012-01-06 14:41:08 -05:00
Kjartan Maraas
a44404f4ec Updated Norwegian bokmål translation 2012-01-06 20:35:34 +01:00
Daniel Mustieles
20825918a3 Updated Spanish translation 2012-01-06 20:31:54 +01:00
Ryan Lortie
21d2c49f82 minor fixup to last commit 2012-01-06 10:25:03 -05:00
Ryan Lortie
752f0cac15 GHashTable: new 'add' and 'contains' APIs
These are both convenience APIs that make it slightly nicer to use
GHashTable as a set (which is something we document as officially
supported).
2012-01-06 10:18:41 -05:00
Nguyễn Thái Ngọc Duy
b87f6f9f8c gio/gsocks5proxy: typo fix 2012-01-06 16:58:57 +07:00
Nguyễn Thái Ngọc Duy
6e92646f21 Updated Vietnamese translation 2012-01-06 16:58:28 +07:00
Nguyễn Thái Ngọc Duy
74345b3383 po/vi: import from Damned Lies 2012-01-06 16:48:13 +07:00
Dan Winship
0da8db52cd Remove some cruft from an older version of the code 2012-01-05 12:57:18 -05:00
Michael Terry
382341dd99 gdesktopappinfo: Fix gtk-doc to mention Keywords not X-GNOME-Keywords
https://bugzilla.gnome.org/show_bug.cgi?id=667285
2012-01-05 11:19:22 -05:00
Simon McVittie
2fe964eeb1 Mention g_test_undefined() when documenting assert_failed, assert_stderr
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666116
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Colin Walters <walters@verbum.org>
2012-01-05 15:47:50 +00:00
Simon McVittie
254efaf85e Skip tests of incorrect property usage under gtester -m no-undefined
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666116
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Colin Walters <walters@verbum.org>
2012-01-05 15:47:26 +00:00
Javier Jardón
e3d53d5529 glib/*: Use g_slist_free_full() convenience function 2012-01-05 04:57:48 +01:00
Javier Jardón
c735b54a63 gio/*: Use g_slist_free_full() convenience function 2012-01-05 04:57:47 +01:00