diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2023-03-31 15:24:13 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2023-03-31 15:24:13 +0200 |
commit | 98f3b67b5c1bd71d0e7b41193fb4683fc957e321 (patch) | |
tree | 1fa8a4cf1bf9a93a79bfe08be83426bb15da01e9 /glib/src/binding.ccg | |
parent | b7ad9b86d70003c065606c563578cc66dcd2ce0a (diff) | |
download | glibmm-98f3b67b5c1bd71d0e7b41193fb4683fc957e321.tar.gz |
Glib: Use callback functions with C linkageglibmm-2-76
* gio/src/cancellable.ccg: Add TODO comment.
* glib/glibmm/class.cc: Call custom_class_base_finalize_function() and
custom_class_init_function() via local functions with C linkage.
* glib/glibmm/extraclassinit.h: Point out in the class documentation that
the class init and instance init functions shall have C linkage.
* glib/glibmm/main.[cc|h]: Call prepare_vfunc(), check_vfunc() and
dispatch_vfunc() via local functions with C linkage.
* glib/glibmm/objectbase.cc: Call destroy_notify_callback()
via a local function with C linkage.
* glib/glibmm/propertyproxy_base.cc: Call PropertyProxyConnectionNode::
callback() and destroy_notify_handler() via local functions with C linkage.
* glib/glibmm/signalproxy.cc: Call SignalProxyNormal::slot0_void_callback()
and SignalProxyConnectionNode::destroy_notify_handler() via local functions
with C linkage.
* glib/src/binding.ccg: Add extern "C".
* glib/src/bytearray.ccg: Add a TODO comment.
* glib/src/markup.ccg: Call functions in the vfunc table via local
functions with C linkage.
* glib/src/optioncontext.ccg: Add extern "C".
* glib/src/optiongroup.ccg: Call post_parse_callback() and
option_arg_callback() via local functions with C linkage.
Part of issue #1
Diffstat (limited to 'glib/src/binding.ccg')
-rw-r--r-- | glib/src/binding.ccg | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/glib/src/binding.ccg b/glib/src/binding.ccg index ff753380..f759ab3c 100644 --- a/glib/src/binding.ccg +++ b/glib/src/binding.ccg @@ -49,7 +49,9 @@ Binding_transform_callback_common( return result; } -gboolean +extern "C" +{ +static gboolean Binding_transform_to_callback( GBinding*, const GValue* from_value, GValue* to_value, gpointer user_data) { @@ -59,7 +61,7 @@ Binding_transform_to_callback( return Binding_transform_callback_common(from_value, to_value, the_slot); } -gboolean +static gboolean Binding_transform_from_callback( GBinding*, const GValue* from_value, GValue* to_value, gpointer user_data) { @@ -69,12 +71,12 @@ Binding_transform_from_callback( return Binding_transform_callback_common(from_value, to_value, the_slot); } -void +static void Binding_transform_callback_destroy(gpointer user_data) { delete static_cast<BindingTransformSlots*>(user_data); } - +} // extern "C" } // anonymous namespace namespace Glib |