Commit Graph

12028 Commits

Author SHA1 Message Date
Alexander Larsson
f02ec2f2de Optimize single-handler va_marshaller case
When there is only one closure handling a signal emission and
it doesn't have a bunch of complicated features enabled we
can short circuit the va_args collection into GValues and call the
callback via the va_marshaller directly.

https://bugzilla.gnome.org/show_bug.cgi?id=661140
2012-03-02 17:13:03 +01:00
Alexander Larsson
a3e91088ce Use builtin marshallers and va_marshallers if possible
If the signal argumment types matches a built in standard
marshaller we use the va_marshaller for that, and also the
normal marshaller if NULL was specified (as its faster than
the generic one).
2012-03-02 17:13:03 +01:00
Alexander Larsson
7964cda8e6 Add g_signal_set_va_marshaller
This lets you set a va_marshaller on your signal which will be
propagated to all closures for the signal. Also, automatically
uses the generica va_marshaller if you specify a NULL c_marshaller.

https://bugzilla.gnome.org/show_bug.cgi?id=661140
2012-03-02 17:13:03 +01:00
Alexander Larsson
1c4f0ca483 Add _g_closure_is_void to check for NULL vfuncs
https://bugzilla.gnome.org/show_bug.cgi?id=661140
2012-03-02 17:13:03 +01:00
Alexander Larsson
57051905f9 Support generating va marshallers in glib-genmarshal
https://bugzilla.gnome.org/show_bug.cgi?id=661140
2012-03-02 17:13:03 +01:00
Alexander Larsson
588af03a28 Add optional support for varargs marshallers to GClosure
These closures support being invoked on a va_args which can
be useful as you can then avoid boxing the va_args into
GValues in certain cases.

https://bugzilla.gnome.org/show_bug.cgi?id=661140
2012-03-02 17:13:03 +01:00
Alexander Larsson
d5fbbe400a Add GRealClosure and move meta_marshallers there
This means we're not abusing the notifiers for meta_marshallres,
and we're able to later cleanly add other fields to GClosure.

We still have to leave the ABI intact for the GClosure->meta_marshal
bit, as old G_CLOSURE_N_NOTIFIERS macro instances still accesses it.
However, we always set it to zero to keep those macros working.

https://bugzilla.gnome.org/show_bug.cgi?id=661140
2012-03-02 17:13:03 +01:00
Alexander Larsson
950e6a4a20 tests: Add generic and empty signal emission performace tests
generic means it uses the generic marshaller
empty means the vfunc pointer is NULL

https://bugzilla.gnome.org/show_bug.cgi?id=661140
2012-03-02 17:13:03 +01:00
Lionel Landwerlin
3be0e57458 tests: performance: add emit-handled/emit-unhandled tests
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
2012-03-02 17:13:03 +01:00
Jörn Magens
00f1e1f5c2 GSequence: add note about lookup requiring sorting
g_sequence_lookup() only works on sorted sequences, but it's quite easy
to create unsorted sequences.  Add a note to the documentation that the
sequence must be sorted in order for g_sequence_lookup() to work.

https://bugzilla.gnome.org/show_bug.cgi?id=670969
2012-03-02 09:08:30 -05:00
Yaron Shahrabani
7e7e0b141c Updated Hebrew translation. 2012-03-02 14:15:58 +02:00
Christian Dywan
cb0566eaf3 gobject/gtype.c: Emphasize use of priv in member and use g_return_val_if_fail
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=597785

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2012-03-01 21:40:35 +00:00
David Zeuthen
10fbfcf090 Add G_VOLUME_IDENTIFIER_KIND_CLASS identifier
If an application (such as Nautilus) wants to show a sidebar with
devices group into different groups such as "Devices" and "Network",
it's currently up to the application itself to do the classification
(for example by looking at the URI scheme for the activation root,
e.g. smb://).

This patch adds a new identifier G_VOLUME_IDENTIFIER_KIND_CLASS that
can be set by volume monitors and used by applications.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-03-01 14:06:43 -05:00
Krishnababu Krothapalli
479416fada Updated Telugu Translations 2012-03-01 13:59:41 +05:30
Colin Walters
80611295ab g_uri_unescape_segment: Mention (allow-none)/%NULL in documentation 2012-02-29 13:09:41 -05:00
Emmanuele Bassi
ede8707129 Version the deprecation of g_value_array_get_type()
Just like the rest of the GValueArray API.
2012-02-29 17:56:06 +00:00
Andoni Morales Alastruey
c5b6f774c4 gsocket: fix compilation when ENOTSOCK and WSANOTSOCK are both defined 2012-02-29 11:29:23 +01:00
Chun-wei Fan
9db8692f5a Update Visual C++ projects
Update the build support of the included PCRE as we are now including
PCRE 8.30 with the GLib distribution.

Also "install" the new gversionmacros.h header file.
2012-02-29 11:58:16 +08:00
Aleksander Morgado
2bde3e8d83 gio-2.0.pc: add gdbus_codegen variable
https://bugzilla.gnome.org/show_bug.cgi?id=670922
2012-02-28 10:36:54 +01:00
Fran Diéguez
0155e19566 Updated Galician translations 2012-02-28 00:32:18 +01:00
David Zeuthen
7a4a973cfd GDBusConnection: Don't leak message reply in error path
This was reported in bug 670909.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-02-27 14:53:13 -05:00
Ryan Lortie
eeccd3866a GDBusMenuModel: plug a leak of a GHashTable 2012-02-27 14:01:10 -05:00
Christian Persch
51f1297a6e Fixup docs comment 2012-02-27 16:25:50 +01:00
Christian Persch
d2c37669f2 regex: unicode: Update to Unicode 6.1.0
Update some more PCRE tables to Unicode 6.1.0. Should be completely
updated now.
2012-02-27 13:27:13 +01:00
Matthias Clasen
c67ad269f1 Fix doc build again
The way gtk-doc works, we need compiling.sgml in both
content_files (to make sure it ends up in the disted tarball)
and in expand_content_files (to have references expanded).
2012-02-27 07:16:11 -05:00
Matthias Clasen
96c98ce62e Improve the wording of the message for G_UNAVAILABLE
The version number we have here is the one the function appeared
in, not the max-allowed version. Therefore 'unavailable before
VERSION' makes more sense than 'unavailable for VERSION'.
2012-02-27 06:54:16 -05:00
Rico Tzschichholz
fecdb4f8dc docs/glib: Moving back compiling.sgml to content_files to fix make dist 2012-02-27 12:50:18 +01:00
Alexander Shopov
37c84b3bbf Updated Bulgarian translation 2012-02-27 07:34:23 +02:00
Matthias Clasen
4995ef4dd7 Add a 'these are private' note for the version macros 2012-02-27 00:32:13 -05:00
Matthias Clasen
76175ab9ed Improve documentation around deprecations 2012-02-27 00:18:47 -05:00
Emmanuele Bassi
550fcaddf7 Add versioned deprecation annotation
We start from GLib 2.26.

https://bugzilla.gnome.org/show_bug.cgi?id=670542
2012-02-27 00:00:06 -05:00
Emmanuele Bassi
817d992abc value array: Annotate with versioned deprecation
https://bugzilla.gnome.org/show_bug.cgi?id=670542
2012-02-27 00:00:05 -05:00
Emmanuele Bassi
34aeeb7d64 Add flexible API version boundaries
There are cases when it should be possible to define at compile time
what range of functions and types should be used, in order to get,
or restrict, the compiler warnings for deprecated or newly added
types or functions.

For instance, if GLib introduces a deprecation warning on a type in
version 2.32, application code can decide to specify the minimum and
maximum boundary of the used API to be 2.30; when compiling against
a new version of GLib, this would produce the following results:

  - all deprecations introduced prior to 2.32 would emit compiler
    warnings when used by the application code;
  - all deprecations introduced in 2.32 would not emit compiler
    warnings when used by the application code;
  - all new symbols introduced in 2.32 would emit a compiler warning.

Using this scheme it should be possible to have fairly complex
situations, like the following one:

  assuming that an application is compiled with:
    GLIB_VERSION_MIN_REQUIRED = GLIB_VERSION_2_30
    GLIB_VERSION_MAX_ALLOWED  = GLIB_VERSION_2_32

  and a GLib header containing:

    void function_A (void) GLIB_DEPRECATED_IN_2_26;
    void function_B (void) GLIB_DEPRECATED_IN_2_28;
    void function_C (void) GLIB_DEPRECATED_IN_2_30;
    void function_D (void) GLIB_AVAILABLE_IN_2_32;
    void function_E (void) GLIB_AVAILABLE_IN_2_34;

  any application code using the above functions will get the following
  compiler warnings:

    function_A: deprecated symbol warning
    function_B: deprecated symbol warning
    function_C: no warning
    function_D: no warning
    function_E: undefined symbol warning

This means that it should be possible to gradually port code towards
non-deprecated API gradually, on a per-release basis.

https://bugzilla.gnome.org/show_bug.cgi?id=670542
2012-02-26 23:58:41 -05:00
Christian Persch
d70634526d regex: Remove --disable-regex option
https://bugzilla.gnome.org/show_bug.cgi?id=622149
2012-02-26 22:22:56 -05:00
David King
3e7f42654f docs: Clarify how to unset a GFileInfo attribute
https://bugzilla.gnome.org/show_bug.cgi?id=592666
2012-02-26 22:22:05 -05:00
David King
500aafd099 docs: Clarify g_type_register_fundamental() behaviour
https://bugzilla.gnome.org/show_bug.cgi?id=580873
2012-02-26 22:21:19 -05:00
Christian Persch
989c466296 regex: Remove pcre_ucd.c 2012-02-26 22:09:05 -05:00
Christian Persch
706b72db21 regex: Use glib for unicode data
Use g_unichar_type() and g_unichar_get_script() instead of pcre tables.
2012-02-26 22:09:05 -05:00
Christian Persch
75dffb99b3 regex: Remove obsolete patch 2012-02-26 22:09:05 -05:00
Christian Persch
8e8ab99bad regex: unicode: Update to Unicode 6.1.0 2012-02-26 22:09:05 -05:00
Christian Persch
735e4a6a6a regex: Remove obsolete makefile fragments
The update.sh script doesn't work with current PCRE, so these are obsolete.
2012-02-26 22:09:04 -05:00
Christian Persch
afa3375210 regex: Use glib memory allocator 2012-02-26 22:09:04 -05:00
Christian Persch
38309dc482 regex: Remove obsolete patch 2012-02-26 22:09:04 -05:00
Christian Persch
d02f6393df regex: Use g_ascii_is[x]digit 2012-02-26 22:09:04 -05:00
Christian Persch
8aadf6b3c9 regex: Remove obsolete patch
PCRE doesn't even contain the patched file anymore.
2012-02-26 22:09:04 -05:00
Christian Persch
3225b24cb5 regex: Remove obsolete patches
Upstream PCRE has removed the relocations that these patches were fixing;
the patches are obsolete.
2012-02-26 22:09:03 -05:00
Christian Persch
a40523b7f2 regex: Update included PCRE to 8.30 2012-02-26 22:09:03 -05:00
Matthias Clasen
da4293a4e4 Update case conversion test data for Unicode 6.1 2012-02-26 21:49:20 -05:00
Christian Persch
8280a8ee36 unicode: tests: More script to/from ISO-15924 tests 2012-02-26 21:24:08 -05:00
Christian Persch
58b4cdd38b unicode: tests: Add tests for new scripts 2012-02-26 21:24:08 -05:00