Commit Graph

7452 Commits

Author SHA1 Message Date
Matthias Clasen
f58fa69343 Document that _finish() must be called at most once.
The patch was provided by Will Thompson in bug 602417.
2010-01-02 19:53:02 -05:00
Matthias Clasen
74af99b860 Fix a typo
...and some whitespace fixes. Pointed out by Will Thompson in
bug 602417.
2010-01-02 19:53:02 -05:00
Pablo Castellano
0542e6dbf9 Updated .gitignore files 2010-01-03 01:24:44 +01:00
Matthias Clasen
ab799115de Don't return anything from a void function
Sun C doesn't like it. Reported in bug 604824.
2010-01-02 19:17:37 -05:00
Ivar Smolin
05af612943 Updating Estonian translation 2010-01-02 22:42:01 +02:00
Paolo Borelli
32f79f55ef Bug 604457 - gutf8inputstream.c: increasing unknown size pointer 2009-12-31 12:42:41 +01:00
Javier Jardón
73ca6f7019 [docs] Fix 'Deprecated' tag on some win32 functions
Fix g_win32_get_package_installation_directory() and
g_win32_get_package_installation_subdirectory_utf8()
2009-12-28 02:04:01 +01:00
Javier Jardón
85e00d3a94 [docs] Fix 'Deprecated' tag in g_date_set_time() 2009-12-24 05:05:21 +01:00
Martin Pitt
da66897950 Support storing assertion messages into core dump
Crash interception/debugging systems like Apport or ABRT capture core dumps for
later crash analysis. However, if a program exits with an assertion failure,
the core dump is not useful since the assertion message is only printed to
stderr.

glibc recently got a patch which stores the message of assert() into the
__abort_msg global variable.
(http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=48dcd0ba)
That works fine for programs which actually use the standard C assert() macro.

This patch adds the same functionality for glib's assertion tests. If we are
building against a glibc which already has __abort_msg (2.11 and later, or
backported above git commit), use that, otherwise put it into our own field
__glib_assert_msg.

Usage:

  $ cat test.c
  #include <glib.h>

  int main() {
      g_assert(1 < 0);
      return 0;
  }

  $ ./test
  **ERROR:test.c:5:main: assertion failed: (1 < 0)
  Aborted (Core dumped)

  $ gdb --batch --ex 'print (char*) __abort_msg' ./test core
  [...]
  $1 = 0x93bf028 "ERROR:test.c:5:main: assertion failed: (1 < 0)"

https://bugzilla.gnome.org/show_bug.cgi?id=594872
2009-12-23 15:51:11 +00:00
Theppitak Karoonboonyanan
e9ab9eaff6 Updated Thai translation. 2009-12-22 23:39:21 +07:00
Tor Lillqvist
8202728f06 Install gio-unix-2.0.pc only on Unix
The gio-unix-2.0 headers are installed only on Unix anyway.
2009-12-22 00:48:34 +02:00
Javier Jardón
dba6cef3c9 [docs] Fix G_DEFINE_INTERFACE "Since" tag
This symbol is available since Glib 2.24, not 2.20.
2009-12-21 23:07:13 +01:00
Behdad Esfahbod
e7488ca857 [gobject] Grow gvalue transform array exponentially
Bug 589176 - Grow gvalue transform array exponentially

Reduces about 180 realloc calls during g_type_init().
2009-12-21 17:12:17 +01:00
Matthias Clasen
88261680f5 Bump version 2009-12-21 10:56:03 -05:00
Matthias Clasen
d7bdc48c26 2.23.1 2009-12-21 10:54:11 -05:00
Matthias Clasen
ad1580e516 Update release notes 2009-12-21 10:06:59 -05:00
Matthias Clasen
7af2609a44 Updates 2009-12-21 10:06:59 -05:00
Iestyn Pryce
52405a6b5d Updated Welsh translation 2009-12-21 14:57:15 +00:00
Matthias Clasen
71d508776e Remove comment as well 2009-12-21 09:21:54 -05:00
Matthias Clasen
7db8b92b97 Revert the g_set_prgname change
This change breaks our API and causes warnings from essentially all applications.
See bug 563627.
2009-12-21 09:16:32 -05:00
Iestyn Pryce
473fd04132 Updated Welsh translation 2009-12-20 12:05:05 +00:00
Behdad Esfahbod
ccd33a4043 Bug 501166 - Warning message says IA__g_type_init instead of g_type_init 2009-12-19 11:46:19 +01:00
Javier Jardón
9917024949 G_DEFINE_INTERFACE_* documentation is not generated
Fix the documentation: Replace "@Since:" with "Since:"

https://bugzilla.gnome.org/show_bug.cgi?id=604645
2009-12-19 02:17:33 +01:00
Kamal Mostafa
046e521b4f Fix typo "Performace" in gtester-report Details pop-up window 2009-12-19 01:57:03 +01:00
Dan Winship
f74c0e257f update .gitignores 2009-12-18 12:27:36 +01:00
Dan Winship
28d91b5bb6 Fix UnixWare build by not using "sa_len" as a variable name
https://bugzilla.gnome.org/show_bug.cgi?id=604875
2009-12-18 10:26:09 +01:00
Nguyễn Thái Ngọc Duy
50741f2fb2 vi.po: updated Vietnamese translation 2009-12-18 15:00:54 +07:00
Gian Mario Tagliaretti
3f41e31bf9 Remove wrong file imports, only gio/gio.h should be included 2009-12-16 23:18:17 +01:00
Tor Lillqvist
a0bcd63304 Don't check for headers we include unconditionally
Don't bother checking for winsock2.h and mswsock.h in the configure
script as we include these unconditionally when building for Windows
anyway.
2009-12-14 03:16:55 +02:00
Tor Lillqvist
8dc200db04 Check for <wspiapi.h> and use it if present
Should help bug #603527 if glib is built in an environment that has
<wspiapi.h>.
2009-12-14 03:09:46 +02:00
Paolo Borelli
cdf00a6a9b Add unit tests for some more methods 2009-12-08 17:05:09 +01:00
Alexander Larsson
4fbbe190b7 Remove default implementation of async filter steam ops
Not only is the default implementation broken (it causes infinite recursion
as seen in bug #603982), but its also worthless. If we just fall back on the
default stream operations we automatically get async version based on
the sync filter stream operations, which is what we want.
2009-12-07 22:14:10 +01:00
Paolo Borelli
8a6d5e203e Fix makefile typo 2009-12-06 15:45:37 +01:00
Paolo Borelli
568cd48365 Add GUtf8InputStream - Bug #603270
Add a filter input stream that performs utf8 validation.
2009-12-06 15:23:33 +01:00
Yair Hershkovitz
c20280b41b Updated Hebrew translation 2009-12-06 08:41:49 +02:00
Kjartan Maraas
efb594b7d4 Updated Norwegian bokmål translation. 2009-12-04 21:18:32 +01:00
Matthew W. S. Bell
2321e5aed0 Initialise variable in g_time_val_from_iso8601()
The function does not initialise the struct tm,
giving it improper values of tm_isdst making the result
an hour out.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=603540
2009-12-02 01:48:30 +01:00
Jeroen Nijhof
3d8035f799 [gio] Remove some commas at end of enumerator list
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=603476
2009-12-01 19:48:04 +01:00
Dan Winship
39cd766e8e Use G_DEFINE_INTERFACE in gio
Note: Since we export types with Iface in the name rather than
Interface we have to use some typedefs to make this work. New
interfaces should probably use Interface as the public name.
2009-12-01 10:44:42 +01:00
Dan Winship
91d96350a7 Add G_DEFINE_INTERFACE
This is a macro similar to G_DEFINE_TYPE but it lets you define
interfaces rather than classes.

For discussion, see bug #320482
2009-12-01 10:44:42 +01:00
Ryan Lortie
74a970f754 Add byteswap macros for gsize/gssize. 2009-11-30 19:53:30 -05:00
Benjamin Otte
2a78adc5e3 Only add object to list new objects when it has a custom constructor
This works around the need to take a custom mutex twice and add the
object to a GSList of objects that are currently in construction for the
common case. Only when the constructor is overwritten do we use the
previous behavior and allow things like singleton objects.

The only slightly incompatible change is that previously, it was ok to
call g_object_set() on construct-only properties while the object was
initialized. This will now fail. If that behavior is needed, setting a
custom constructor that just chains up will reenable this functionality.

https://bugzilla.gnome.org/show_bug.cgi?id=557151
2009-11-30 20:52:33 +01:00
Benjamin Otte
f0f32a7ef0 Remove more read locks usage
g_type_default_interface_peek() and g_type_value_table_peek() don't need
to acquire read locks anymore when they test the refcount instead of
node->data.
2009-11-30 20:52:33 +01:00
Benjamin Otte
5cac5c828b Make g_type_class_peek[_static]() not take any locks
By replacing a check for node->data with a check for NODE_REFCOUNT(node)
these functions don't require a read lock anymore.
2009-11-30 20:52:33 +01:00
Edward Hervey
83ee0d947d gobject/tests: New test for dynamic class creation/destruction
Starts 100 threads which ref/unref a dynamic class to test the recent
changes to class init/uninit.
2009-11-30 20:52:33 +01:00
Edward Hervey
35c376a8a6 Add type_data_ref_U() and use it in g_type_class_ref()
The function returns TRUE if the type was previously initialized and can
be easily reused. It returns FALSE and does not take a reference if the
type is not referenced yet.

g_type_class_ref() uses this to avoid taking locks in the common path,
which speeds up object creation a lot - in particular in multithreaded
applications.

https://bugzilla.gnome.org/show_bug.cgi?id=585375
2009-11-30 20:52:33 +01:00
Edward Hervey
5160175656 Reorganize g_type_class_ref()
Moves the first check out of the lock, as it's not required.

https://bugzilla.gnome.org/show_bug.cgi?id=585375
2009-11-30 20:52:33 +01:00
Benjamin Otte
00a4470ad0 Make ClassData->init_state atomic
This is necessary to make g_type_class_ref() lockless.

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

Also includes fix for:

https://bugzilla.gnome.org/show_bug.cgi?id=587892
2009-11-30 20:52:33 +01:00
Edward Hervey
4c243b1cba Make type_data_unref_U not take locks in the common case
https://bugzilla.gnome.org/show_bug.cgi?id=585375
2009-11-30 20:52:32 +01:00
Edward Hervey
5e7dba0501 Make all accesses of Node->ref_count atomic
This does not change any locking behavior at all, it just replaces
simple getters/setters of the variable with atomic versions.

The ref_count variable was kept as unsigned, even though that requires
casting for all operations, to mirror GObject->refcount.

https://bugzilla.gnome.org/show_bug.cgi?id=585375
2009-11-30 20:52:32 +01:00