summaryrefslogtreecommitdiff
path: root/gio
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2023-03-31 15:24:13 +0200
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2023-03-31 15:24:13 +0200
commit98f3b67b5c1bd71d0e7b41193fb4683fc957e321 (patch)
tree1fa8a4cf1bf9a93a79bfe08be83426bb15da01e9 /gio
parentb7ad9b86d70003c065606c563578cc66dcd2ce0a (diff)
downloadglibmm-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 'gio')
-rw-r--r--gio/src/cancellable.ccg8
1 files changed, 6 insertions, 2 deletions
diff --git a/gio/src/cancellable.ccg b/gio/src/cancellable.ccg
index 87d8f660..25826298 100644
--- a/gio/src/cancellable.ccg
+++ b/gio/src/cancellable.ccg
@@ -20,8 +20,11 @@
namespace Gio
{
-extern "C" {
-
+extern "C"
+{
+// Non-static functions with C linkage get external linkage, even if they are
+// defined in an anonymous namespace.
+//TODO: Declare 'static' when we can break ABI.
void
delete_slot(gpointer data)
{
@@ -30,6 +33,7 @@ delete_slot(gpointer data)
delete callback;
}
+//TODO: Declare 'static' when we can break ABI.
void
slot_cancelled_proxy(GCancellable* /*cancellable*/, gpointer data)
{