Commit Graph

9877 Commits

Author SHA1 Message Date
Matthias Clasen
ef5d4d55fe Fix make check
g_thread_init() causes a hash table to be allocated (in read_aliases).
Since hash tables are now a bit larger, we need to bump one of the
probe sizes to avoid our probe slice being used for the aliases
hash table.
2011-05-01 17:10:04 -04:00
Abduxukur Abdurixit
a84637377c Added UG translation 2011-05-01 20:04:51 +02:00
Matthias Clasen
d09df426ba GHash: make sets with refcounted keys work correctly
When keys == values, we have to be careful about the order in
which we replace their elements.
2011-05-01 10:55:24 -04:00
Matthias Clasen
be991170fa GHash: introduce a "set" mode
Make hash tables start out in a mode in which they don't store
values at all, until the first insertion of a non-identical
key-value pair.

This reduces memory requirements by 1/3 when using hash tables
to store sets.

Based on a patch by Morten Welinder,
https://bugzilla.gnome.org/show_bug.cgi?id=644437
2011-04-30 23:11:18 -04:00
Morten Welinder
0ae6bc3aaa GHash: eliminate one of the lookup_nodes functions.
Kill g_hash_table_lookup_node and rename g_hash_table_lookup_node_for_insertion
to g_hash_table_lookup_node.  Since at this point we already check for
toombstones in all callers of g_hash_table_lookup_node this doesn't make
a difference.

https://bugzilla.gnome.org/show_bug.cgi?id=644437
2011-04-30 23:11:18 -04:00
Morten Welinder
6e45153ef7 GHash: split nodes array into seperate arrays.
This reduces memory requirements by 1/6 on 64-bit machines since
no padding is needed.  It also puts less strain on the memory
allocator since we no longer need one giant slab of memory.

https://bugzilla.gnome.org/show_bug.cgi?id=644437
2011-04-30 23:11:18 -04:00
Morten Welinder
4d8e64e6e8 GHash: use macros to check for magic hash values.
https://bugzilla.gnome.org/show_bug.cgi?id=644437
2011-04-30 23:11:18 -04:00
Chun-wei Fan
707e011061 Update VS2008/2010 README.txt
Tell people about the usage of ZLib to avoid the
problem such as the one mentioned in Bug 633977
2011-05-01 09:42:22 +08:00
Behdad Esfahbod
acda716d2d Bug 648966 - Update g_unichar_iswide and g_unichar_iswide_cjk
Update to Unicode 6.0.  Also attach Python script that generates
the tables.
2011-04-29 18:03:24 -04:00
Ryan Lortie
426e1b6159 Remove duplicate GDBusInterface declaration
It was in gdbusinterface.h but also in giotypes.h.  Remove it from the
former.
2011-04-29 17:07:28 -04:00
David Zeuthen
92aed13eb8 Update docs to take comments/suggestions from Matthias into account
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-29 13:11:22 -04:00
David Zeuthen
0e352fdb18 Merge branch 'master' into gdbus-codegen 2011-04-29 12:01:35 -04:00
Alexander Larsson
9eba49a982 GFilterInputStream: close-base-stream should not be construct-only
This is a runtime changable property (by the methods for it), must
be a cut and paste error.
2011-04-29 16:14:17 +02:00
Colin Walters
a04efe6afb Use SIGTRAP (via G_BREAKPOINT()) if G_DEBUG=fatal-warnings
On Linux with gdb, it's much more convenient to debug programs using
G_DEBUG=fatal-warnings if we send SIGTRAP instead of abort() by
default.  The default handler for both is to terminate the process.

In particular this makes it more easily possible to debug a warning
that's not the first in a program; you can skip past it and
go to the warning you care about.

The "aborting..." message is removed since it's no longer accurate,
and anyways was never very useful; crashes should show up in ABRT/apport
type crash catching systems.

https://bugzilla.gnome.org/show_bug.cgi?id=648423
2011-04-28 14:48:48 -04:00
Daniel Mustieles
1763c2a575 Updated Spanish translation 2011-04-28 20:45:34 +02:00
Shaun McCance
e585059514 glib/gvariant.c: Fix variable name in example code 2011-04-28 12:41:41 -04:00
Colin Walters
a1fbe7ae84 Drop stray reference to gthread.la
We now build this test multithreaded in gthread/tests.
2011-04-27 19:09:38 -04:00
Colin Walters
7b04bbc8e0 glib/Makefile.am: Remove stray tab 2011-04-27 18:42:29 -04:00
Colin Walters
549d895fa4 glib-unix: New API to watch some Unix signals
This new API allows watching a few select Unix signals;
looking through the list on my system, I didn't see anything
else that I think it'd reasonable to watch.

We build on the previous patch to make the child watch helper thread
that existed on Unix handle these signals in the threaded case.
In the non-threaded case, they're just global variables.

https://bugzilla.gnome.org/show_bug.cgi?id=644941
2011-04-27 16:01:39 -04:00
Colin Walters
920899d78f gmain: Prepare child watch handling for more generic signal handling
In preparation for supporting more Unix signals such as SIGHUP,
SIGTERM etc.,

https://bugzilla.gnome.org/show_bug.cgi?id=644941
2011-04-27 14:58:36 -04:00
Colin Walters
0ff211f520 glib-unix: New Unix-specific API
GLib historically has been designed to be "mostly" portable; there
are some functions only available on Unix like g_io_channel_unix_new(),
but these are typically paired with obvious counterparts for Win32.

However, as GLib is used not only by portable software, but components
targeting Unix (or even just Linux), there are a few cases where it
would be very convenient if GLib shipped built-in functionality.

This initial patch is a basic wrapper around pipe2(), including
fallbacks for older kernels.  This pairs well with the
existing g_spawn_*() API and its child_setup functionality.

However, in the future, I want to add a signal() wrapper here,
complete with proxying the signal to a mainloop.  I have initial code
for this, but doing it sanely (including factoring out gmain.c's
private worker thread), is a complex task, and I don't want to block
on that.

See also gwin32.h for Win32 specific functionality.

https://bugzilla.gnome.org/show_bug.cgi?id=644941
2011-04-27 13:29:38 -04:00
Colin Walters
27246c615d Update gio.symbols for previous two commits 2011-04-27 13:29:07 -04:00
Colin Walters
4098ddcb06 GDesktopAppInfo: Add g_desktop_app_info_get_generic_name
Necessary for rebasing gnome-menus on top of GDesktopAppInfo.

https://bugzilla.gnome.org/show_bug.cgi?id=647967
2011-04-27 11:34:43 -04:00
Colin Walters
276e6a7be8 GDesktopAppInfo: Add g_desktop_app_info_get_categories()
This is needed to rebase gnome-menus on top of GDesktopAppInfo.

https://bugzilla.gnome.org/show_bug.cgi?id=647903
2011-04-27 11:24:37 -04:00
David Schleef
0dc5d45692 Fix %z in g_date_time_format()
https://bugzilla.gnome.org/show_bug.cgi?id=642935
2011-04-27 02:36:12 -04:00
Matthias Clasen
d3b80c49ea GHashTable: Small optimization of remove-all
Don't enter the loop if we are not going to notify anyway.
Pointed out in bug 646013.
2011-04-27 00:03:59 -04:00
Matthias Clasen
fc7403b675 GHashTable: Add a test for remove-all functionality 2011-04-27 00:03:28 -04:00
Matthias Clasen
4832289bc0 Whitespace cleanup 2011-04-26 23:57:17 -04:00
Maciej Piechotka
70a1981532 Allow caching have_qsort_r which re-enables cross-compiling
https://bugzilla.gnome.org/show_bug.cgi?id=646309
2011-04-26 23:41:51 -04:00
Matthias Clasen
fdf83b5108 Fix mailing list link in README
Patch by Thomas Andersen, bug 647594
2011-04-26 23:26:58 -04:00
Murray Cumming
6dcf505346 GDBusServer: Documentation: Improvements.
Provide a fuller description and lead people away if they arrived
here just looking for a way to provide a regular D-Bus service.

https://bugzilla.gnome.org/show_bug.cgi?id=646425
2011-04-26 23:21:02 -04:00
Christian Persch
71c7e49058 Use G_SIGNAL_MUST_COLLECT for VARIANT signals
Bug #643624.
2011-04-26 22:58:02 -04:00
Matthias Clasen
122a53a9bc Fix up some harmless FALSE <> NULL confusions
Reported in bug 643134.
2011-04-26 22:51:54 -04:00
Matthias Clasen
440bd2a975 GSequence: Make g_sequence_iter_move behave as documented
As pointed out in bug 658313, moving before the begin iter is
supposed to return the begin iter, not the end iter. Also add
a test for this behaviour.
2011-04-26 22:08:24 -04:00
Colin Walters
2a3f7f49b4 GDesktopAppInfo: Add "filename" property for bindings
GDesktopAppInfo violates the GObject rule that your C constructors
should just be thin wrappers around g_object_new().  While GKeyFile
isn't introspctable, this patch allows from JavaScript:

var app = new Gio.DesktopAppInfo({ filename: '/path/to/foo.desktop' });

https://bugzilla.gnome.org/show_bug.cgi?id=648425
2011-04-26 15:08:54 -04:00
Colin Walters
1056f2240c Squash some uninitialized variable compiler warnings
From GCC 4.6.
2011-04-26 13:29:05 -04:00
Dan Winship
df45856bba GSimpleAsyncResult: push thread context around callback
When an old pre-thread-default-context API that takes an explicit
GMainContext wants to call a gio API, it must call
g_main_context_push_thread_default() before, and
g_main_context_pop_thread_default() after the gio call, so that the
gio method will return its result to the desired GMainContext.

But this fails for methods like g_socket_client_connect_async() that
make a chain of multiple async calls, since the pushed/popped context
will only affect the initial call.

Fix this by having GSimpleAsyncResult itself push/pop the context
around the callback invocation, so that if the callback queues another
async request, it will stay in the same context as the original one.

https://bugzilla.gnome.org/show_bug.cgi?id=646957
2011-04-26 11:32:11 -04:00
Muhammet Kara
b27f2e051e Updated Turkish translation 2011-04-26 03:04:20 +03:00
David Zeuthen
0377fe7005 gdbus-codegen: Fix typo in generated docs
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-25 10:42:50 -04:00
David Zeuthen
bbe945183b gdbus-codegen: Generate GDBusObject{,Proxy,Skeleton} subtypes
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-25 09:29:18 -04:00
Michael Terry
a330c2f19f Don't ignore SUPPORTS_STARTUP_NOTIFICATION for commandline GAppInfos
https://bugzilla.gnome.org/show_bug.cgi?id=648416
2011-04-25 08:34:13 -04:00
Chun-wei Fan
d8de88e541 Add VS 2008 compilation support for some utilities
-Added projects to compile the glib-compile-schemas and gsettings utilities
-Update .vsprops to install these in "install" phase
-Distribute these projects also
2011-04-25 13:47:07 +08:00
Chun-wei Fan
dc7e9a54e5 Add VS 2010 compilation support for some utilities
-Added projects to compile the glib-compile-schemas and gsettings utilities
-Update .vsprops to install these in "install" phase
-Distribute these projects also
2011-04-25 13:32:18 +08:00
David Zeuthen
58eb4da5c5 Fix build broken by previous commit
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-23 19:26:56 -04:00
David Zeuthen
b5b34fa2f2 gdbus-codegen: Include docs for generated code in the GIO docs
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-23 17:43:03 -04:00
Thomas Hindoe Paaboel Andersen
f42d97b88b docs: fix typos in networking classes 2011-04-20 21:08:15 +02:00
David Zeuthen
f0eeadf306 GDBusObjectManagerServer: make export() return whether the object was removed
This is useful in conjunction with g_warn_if_fail().

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-20 11:54:24 -04:00
Dan Winship
c2f670ef49 GSocketService: clarify transfer semantics of incoming connections
The @connection parameter to the ::incoming signal is (transfer none),
so you need to ref it if you want to keep it.

https://bugzilla.gnome.org/show_bug.cgi?id=647746
2011-04-20 11:24:46 -04:00
David Zeuthen
35b6c76244 gdbus-codegen: Document the generated FOO_PEEK_BAR() and FOO_GET_BAR() macros
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-20 09:00:16 -04:00
David Zeuthen
bd5da131a2 gdbus-codegen: Generate gtk-doc section docs
This is nice to have if using gtk-doc on the generated code. We could
also generate -sections.txt and .types files but we don't do that
right now...

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-19 14:40:34 -04:00