Commit Graph

5 Commits

Author SHA1 Message Date
Niels De Graef
dc5fd4f15e channel-map: Don't specify default c_marshaller
Apart from being less code, this actually gives us a tiny performance
improvement. Up until a few years ago, if you pass `NULL` as the
marshaller for a signal, GLib would fall back to
`g_cclosure_marshal_generic` which uses libffi to pack/unpack its
arguments. One could avoid this by specifying a more specific
marshaller which would then be used to immediately pack and unpack into
GValues with the correct type.

Lately however, as a way of optimizing signal emission (which can be
quite expensive), GLib added a possibility to set a `va_marshaller`,
which skips the unnecessary GValue packing and unpacking and just uses a
valist variant.

Since the performance difference is big enough, if the marshaller
argument is NULL, `g_signal_new()` will now check for the simple
marshallers (return type NONE and a single argument) and set both the
generic and the valist marshaller. In other words, less code for us with
behind-the-scenes optimizations.

In case you also want va_marshallers for more complex signals, you can
use `g_signal_set_va_marshaller()`.
2023-07-18 15:52:10 +00:00
Alberts Muktupāvels
13a4a9a5c2 avoid deprecated g_type_class_add_private 2018-09-09 00:02:41 +03:00
Alberts Muktupāvels
7e2d239a91 remove unneeded *_class_init and *_init declarations 2015-09-09 14:13:00 +03:00
Giovanni Campagna
a1448acc5b Fix introspection support
Fix includes, comments and parameter names so that introspection builds
without warnings.
2012-10-19 20:00:47 +02:00
Giovanni Campagna
9b6e6719d4 Initial import
Code from gnome-control-center, build system integration from gnome-shell
2012-10-19 20:00:25 +02:00