Commit 22ba4411 authored by Christian Hergert's avatar Christian Hergert

gio: remove use of generic marshaller from GIO objects

Using the generic marshaller has drawbacks beyond performance. One such
drawback is that it breaks the stack unwinding from the Linux kernel due
to having unsufficient data to walk past ffi_call_unixt64. That means that
performance profiling by application developers looks grouped among
seemingly unrelated code paths.

While we can't fix the kernel unwinding here, we can provide proper
c_marshallers and va_marshallers for objects within Gio so that
performance profiling of applications is more reliable.

Related to Initiatives#10
parent 273c00f6
Pipeline #88949 passed with stages
in 19 minutes and 2 seconds
......@@ -21,6 +21,7 @@
#include "gactiongroup.h"
#include "gaction.h"
#include "glibintl.h"
#include "gmarshal-internal.h"
/**
* SECTION:gactiongroup
......@@ -303,10 +304,13 @@ g_action_group_default_init (GActionGroupInterface *iface)
G_STRUCT_OFFSET (GActionGroupInterface,
action_enabled_changed),
NULL, NULL,
NULL,
_g_cclosure_marshal_VOID__STRING_BOOLEAN,
G_TYPE_NONE, 2,
G_TYPE_STRING,
G_TYPE_BOOLEAN);
g_signal_set_va_marshaller (g_action_group_signals[SIGNAL_ACTION_ENABLED_CHANGED],
G_TYPE_FROM_INTERFACE (iface),
_g_cclosure_marshal_VOID__STRING_BOOLEANv);
/**
* GActionGroup::action-state-changed:
......@@ -327,10 +331,13 @@ g_action_group_default_init (GActionGroupInterface *iface)
G_STRUCT_OFFSET (GActionGroupInterface,
action_state_changed),
NULL, NULL,
NULL,
_g_cclosure_marshal_VOID__STRING_VARIANT,
G_TYPE_NONE, 2,
G_TYPE_STRING,
G_TYPE_VARIANT);
g_signal_set_va_marshaller (g_action_group_signals[SIGNAL_ACTION_STATE_CHANGED],
G_TYPE_FROM_INTERFACE (iface),
_g_cclosure_marshal_VOID__STRING_VARIANTv);
}
/**
......
......@@ -27,6 +27,7 @@
#include "gcancellable.h"
#include "glibintl.h"
#include "gmarshal-internal.h"
#include <gioerror.h>
#include <gfile.h>
......@@ -1177,9 +1178,13 @@ g_app_launch_context_class_init (GAppLaunchContextClass *klass)
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GAppLaunchContextClass, launched),
NULL, NULL, NULL,
NULL, NULL,
_g_cclosure_marshal_VOID__OBJECT_VARIANT,
G_TYPE_NONE, 2,
G_TYPE_APP_INFO, G_TYPE_VARIANT);
g_signal_set_va_marshaller (signals[LAUNCHED],
G_TYPE_FROM_CLASS (klass),
_g_cclosure_marshal_VOID__OBJECT_VARIANTv);
}
static void
......
......@@ -38,6 +38,7 @@
#include "gfile.h"
#include "glibintl.h"
#include "gmarshal-internal.h"
#include <string.h>
......@@ -1572,8 +1573,12 @@ g_application_class_init (GApplicationClass *class)
g_application_signals[SIGNAL_OPEN] =
g_signal_new (I_("open"), G_TYPE_APPLICATION, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GApplicationClass, open),
NULL, NULL, NULL,
NULL, NULL,
_g_cclosure_marshal_VOID__POINTER_INT_STRING,
G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_INT, G_TYPE_STRING);
g_signal_set_va_marshaller (g_application_signals[SIGNAL_OPEN],
G_TYPE_FROM_CLASS (class),
_g_cclosure_marshal_VOID__POINTER_INT_STRINGv);
/**
* GApplication::command-line:
......@@ -1592,8 +1597,11 @@ g_application_class_init (GApplicationClass *class)
g_signal_new (I_("command-line"), G_TYPE_APPLICATION, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GApplicationClass, command_line),
g_signal_accumulator_first_wins, NULL,
NULL,
_g_cclosure_marshal_INT__OBJECT,
G_TYPE_INT, 1, G_TYPE_APPLICATION_COMMAND_LINE);
g_signal_set_va_marshaller (g_application_signals[SIGNAL_COMMAND_LINE],
G_TYPE_FROM_CLASS (class),
_g_cclosure_marshal_INT__OBJECTv);
/**
* GApplication::handle-local-options:
......@@ -1652,8 +1660,12 @@ g_application_class_init (GApplicationClass *class)
g_application_signals[SIGNAL_HANDLE_LOCAL_OPTIONS] =
g_signal_new (I_("handle-local-options"), G_TYPE_APPLICATION, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GApplicationClass, handle_local_options),
g_application_handle_local_options_accumulator, NULL, NULL,
g_application_handle_local_options_accumulator, NULL,
_g_cclosure_marshal_INT__BOXED,
G_TYPE_INT, 1, G_TYPE_VARIANT_DICT);
g_signal_set_va_marshaller (g_application_signals[SIGNAL_HANDLE_LOCAL_OPTIONS],
G_TYPE_FROM_CLASS (class),
_g_cclosure_marshal_INT__BOXEDv);
/**
* GApplication::name-lost:
......@@ -1672,8 +1684,12 @@ g_application_class_init (GApplicationClass *class)
g_application_signals[SIGNAL_NAME_LOST] =
g_signal_new (I_("name-lost"), G_TYPE_APPLICATION, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GApplicationClass, name_lost),
g_signal_accumulator_true_handled, NULL, NULL,
g_signal_accumulator_true_handled, NULL,
_g_cclosure_marshal_BOOLEAN__VOID,
G_TYPE_BOOLEAN, 0);
g_signal_set_va_marshaller (g_application_signals[SIGNAL_NAME_LOST],
G_TYPE_FROM_CLASS (class),
_g_cclosure_marshal_BOOLEAN__VOIDv);
}
/* Application ID validity {{{1 */
......
......@@ -27,6 +27,7 @@
#include "gdbusprivate.h"
#include "glibintl.h"
#include "gmarshal-internal.h"
/**
* SECTION:gdbusauthobserver
......@@ -198,11 +199,14 @@ g_dbus_auth_observer_class_init (GDBusAuthObserverClass *klass)
G_STRUCT_OFFSET (GDBusAuthObserverClass, authorize_authenticated_peer),
_g_signal_accumulator_false_handled,
NULL, /* accu_data */
NULL,
_g_cclosure_marshal_BOOLEAN__OBJECT_OBJECT,
G_TYPE_BOOLEAN,
2,
G_TYPE_IO_STREAM,
G_TYPE_CREDENTIALS);
g_signal_set_va_marshaller (signals[AUTHORIZE_AUTHENTICATED_PEER_SIGNAL],
G_TYPE_FROM_CLASS (klass),
_g_cclosure_marshal_BOOLEAN__OBJECT_OBJECTv);
/**
* GDBusAuthObserver::allow-mechanism:
......@@ -222,10 +226,13 @@ g_dbus_auth_observer_class_init (GDBusAuthObserverClass *klass)
G_STRUCT_OFFSET (GDBusAuthObserverClass, allow_mechanism),
_g_signal_accumulator_false_handled,
NULL, /* accu_data */
NULL,
_g_cclosure_marshal_BOOLEAN__STRING,
G_TYPE_BOOLEAN,
1,
G_TYPE_STRING);
g_signal_set_va_marshaller (signals[ALLOW_MECHANISM_SIGNAL],
G_TYPE_FROM_CLASS (klass),
_g_cclosure_marshal_BOOLEAN__STRINGv);
}
static void
......
......@@ -111,6 +111,7 @@
#include "giostream.h"
#include "gasyncresult.h"
#include "gtask.h"
#include "gmarshal-internal.h"
#ifdef G_OS_UNIX
#include "gunixconnection.h"
......@@ -1049,11 +1050,14 @@ g_dbus_connection_class_init (GDBusConnectionClass *klass)
G_STRUCT_OFFSET (GDBusConnectionClass, closed),
NULL,
NULL,
NULL,
_g_cclosure_marshal_VOID__BOOLEAN_BOXED,
G_TYPE_NONE,
2,
G_TYPE_BOOLEAN,
G_TYPE_ERROR);
g_signal_set_va_marshaller (signals[CLOSED_SIGNAL],
G_TYPE_FROM_CLASS (klass),
_g_cclosure_marshal_VOID__BOOLEAN_BOXEDv);
}
static void
......
......@@ -27,6 +27,7 @@
#include "gdbusprivate.h"
#include "gdbusmethodinvocation.h"
#include "gdbusconnection.h"
#include "gmarshal-internal.h"
#include "gtask.h"
#include "gioerror.h"
......@@ -248,10 +249,13 @@ g_dbus_interface_skeleton_class_init (GDBusInterfaceSkeletonClass *klass)
G_STRUCT_OFFSET (GDBusInterfaceSkeletonClass, g_authorize_method),
_g_signal_accumulator_false_handled,
NULL,
NULL,
_g_cclosure_marshal_BOOLEAN__OBJECT,
G_TYPE_BOOLEAN,
1,
G_TYPE_DBUS_METHOD_INVOCATION);
g_signal_set_va_marshaller (signals[G_AUTHORIZE_METHOD_SIGNAL],
G_TYPE_FROM_CLASS (klass),
_g_cclosure_marshal_BOOLEAN__OBJECTv);
}
static void
......
......@@ -26,6 +26,7 @@
#include "gdbusutils.h"
#include "glibintl.h"
#include "gmarshal-internal.h"
/**
* SECTION:gdbusobjectmanager
......@@ -126,11 +127,14 @@ g_dbus_object_manager_default_init (GDBusObjectManagerIface *iface)
G_STRUCT_OFFSET (GDBusObjectManagerIface, interface_added),
NULL,
NULL,
NULL,
_g_cclosure_marshal_VOID__OBJECT_OBJECT,
G_TYPE_NONE,
2,
G_TYPE_DBUS_OBJECT,
G_TYPE_DBUS_INTERFACE);
g_signal_set_va_marshaller (signals[INTERFACE_ADDED],
G_TYPE_FROM_INTERFACE (iface),
_g_cclosure_marshal_VOID__OBJECT_OBJECTv);
/**
* GDBusObjectManager::interface-removed:
......@@ -152,11 +156,14 @@ g_dbus_object_manager_default_init (GDBusObjectManagerIface *iface)
G_STRUCT_OFFSET (GDBusObjectManagerIface, interface_removed),
NULL,
NULL,
NULL,
_g_cclosure_marshal_VOID__OBJECT_OBJECT,
G_TYPE_NONE,
2,
G_TYPE_DBUS_OBJECT,
G_TYPE_DBUS_INTERFACE);
g_signal_set_va_marshaller (signals[INTERFACE_REMOVED],
G_TYPE_FROM_INTERFACE (iface),
_g_cclosure_marshal_VOID__OBJECT_OBJECTv);
}
......
......@@ -36,6 +36,7 @@
#include "gdbusinterface.h"
#include "glibintl.h"
#include "gmarshal-internal.h"
/**
* SECTION:gdbusobjectmanagerclient
......@@ -517,7 +518,7 @@ g_dbus_object_manager_client_class_init (GDBusObjectManagerClientClass *klass)
G_STRUCT_OFFSET (GDBusObjectManagerClientClass, interface_proxy_signal),
NULL,
NULL,
NULL,
_g_cclosure_marshal_VOID__OBJECT_OBJECT_STRING_STRING_VARIANT,
G_TYPE_NONE,
5,
G_TYPE_DBUS_OBJECT_PROXY,
......@@ -525,6 +526,9 @@ g_dbus_object_manager_client_class_init (GDBusObjectManagerClientClass *klass)
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_VARIANT);
g_signal_set_va_marshaller (signals[INTERFACE_PROXY_SIGNAL_SIGNAL],
G_TYPE_FROM_CLASS (klass),
_g_cclosure_marshal_VOID__OBJECT_OBJECT_STRING_STRING_VARIANTv);
/**
* GDBusObjectManagerClient::interface-proxy-properties-changed:
......@@ -556,13 +560,16 @@ g_dbus_object_manager_client_class_init (GDBusObjectManagerClientClass *klass)
G_STRUCT_OFFSET (GDBusObjectManagerClientClass, interface_proxy_properties_changed),
NULL,
NULL,
NULL,
_g_cclosure_marshal_VOID__OBJECT_OBJECT_VARIANT_BOXED,
G_TYPE_NONE,
4,
G_TYPE_DBUS_OBJECT_PROXY,
G_TYPE_DBUS_PROXY,
G_TYPE_VARIANT,
G_TYPE_STRV);
g_signal_set_va_marshaller (signals[INTERFACE_PROXY_PROPERTIES_CHANGED_SIGNAL],
G_TYPE_FROM_CLASS (klass),
_g_cclosure_marshal_VOID__OBJECT_OBJECT_VARIANT_BOXEDv);
}
static void
......
......@@ -42,6 +42,7 @@
#endif
#include "glibintl.h"
#include "gmarshal-internal.h"
/**
* SECTION:gdbusproxy
......@@ -595,11 +596,14 @@ g_dbus_proxy_class_init (GDBusProxyClass *klass)
G_STRUCT_OFFSET (GDBusProxyClass, g_properties_changed),
NULL,
NULL,
NULL,
_g_cclosure_marshal_VOID__VARIANT_BOXED,
G_TYPE_NONE,
2,
G_TYPE_VARIANT,
G_TYPE_STRV | G_SIGNAL_TYPE_STATIC_SCOPE);
g_signal_set_va_marshaller (signals[PROPERTIES_CHANGED_SIGNAL],
G_TYPE_FROM_CLASS (klass),
_g_cclosure_marshal_VOID__VARIANT_BOXEDv);
/**
* GDBusProxy::g-signal:
......@@ -618,12 +622,15 @@ g_dbus_proxy_class_init (GDBusProxyClass *klass)
G_STRUCT_OFFSET (GDBusProxyClass, g_signal),
NULL,
NULL,
NULL,
_g_cclosure_marshal_VOID__STRING_STRING_VARIANT,
G_TYPE_NONE,
3,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_VARIANT);
g_signal_set_va_marshaller (signals[SIGNAL_SIGNAL],
G_TYPE_FROM_CLASS (klass),
_g_cclosure_marshal_VOID__STRING_STRING_VARIANTv);
}
......
......@@ -42,6 +42,7 @@
#include "ginetsocketaddress.h"
#include "ginputstream.h"
#include "giostream.h"
#include "gmarshal-internal.h"
#ifdef G_OS_UNIX
#include <unistd.h>
......@@ -452,10 +453,13 @@ g_dbus_server_class_init (GDBusServerClass *klass)
G_STRUCT_OFFSET (GDBusServerClass, new_connection),
g_signal_accumulator_true_handled,
NULL, /* accu_data */
NULL,
_g_cclosure_marshal_BOOLEAN__OBJECT,
G_TYPE_BOOLEAN,
1,
G_TYPE_DBUS_CONNECTION);
g_signal_set_va_marshaller (_signals[NEW_CONNECTION_SIGNAL],
G_TYPE_FROM_CLASS (klass),
_g_cclosure_marshal_BOOLEAN__OBJECTv);
}
static void
......
......@@ -30,6 +30,7 @@
#include "gtlsdatabase.h"
#include "gtlsinteraction.h"
#include "glibintl.h"
#include "gmarshal-internal.h"
/**
* SECTION:gdtlsconnection
......@@ -317,10 +318,13 @@ g_dtls_connection_default_init (GDtlsConnectionInterface *iface)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GDtlsConnectionInterface, accept_certificate),
g_signal_accumulator_true_handled, NULL,
NULL,
_g_cclosure_marshal_BOOLEAN__OBJECT_FLAGS,
G_TYPE_BOOLEAN, 2,
G_TYPE_TLS_CERTIFICATE,
G_TYPE_TLS_CERTIFICATE_FLAGS);
g_signal_set_va_marshaller (signals[ACCEPT_CERTIFICATE],
G_TYPE_FROM_INTERFACE (iface),
_g_cclosure_marshal_BOOLEAN__OBJECT_FLAGSv);
}
/**
......
......@@ -23,6 +23,7 @@
#include "gfilemonitor.h"
#include "gioenumtypes.h"
#include "gmarshal-internal.h"
#include "gfile.h"
#include "gvfs.h"
#include "glibintl.h"
......@@ -181,9 +182,12 @@ g_file_monitor_class_init (GFileMonitorClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GFileMonitorClass, changed),
NULL, NULL,
NULL,
_g_cclosure_marshal_VOID__OBJECT_OBJECT_ENUM,
G_TYPE_NONE, 3,
G_TYPE_FILE, G_TYPE_FILE, G_TYPE_FILE_MONITOR_EVENT);
g_signal_set_va_marshaller (g_file_monitor_changed_signal,
G_TYPE_FROM_CLASS (klass),
_g_cclosure_marshal_VOID__OBJECT_OBJECT_ENUMv);
g_object_class_install_property (object_class, PROP_RATE_LIMIT,
g_param_spec_int ("rate-limit",
......
......@@ -24,6 +24,7 @@
#include "glistmodel.h"
#include "glibintl.h"
#include "gmarshal-internal.h"
G_DEFINE_INTERFACE (GListModel, g_list_model, G_TYPE_OBJECT)
......@@ -141,9 +142,12 @@ g_list_model_default_init (GListModelInterface *iface)
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_generic,
_g_cclosure_marshal_VOID__UINT_UINT_UINT,
G_TYPE_NONE,
3, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT);
g_signal_set_va_marshaller (g_list_model_changed_signal,
G_TYPE_FROM_INTERFACE (iface),
_g_cclosure_marshal_VOID__UINT_UINT_UINTv);
}
/**
......
This diff is collapsed.
This diff is collapsed.
BOOLEAN:OBJECT
BOOLEAN:OBJECT,FLAGS
BOOLEAN:OBJECT,OBJECT
BOOLEAN:POINTER,INT
BOOLEAN:STRING
BOOLEAN:UINT
BOOLEAN:VOID
INT:BOXED
INT:OBJECT
VOID:BOOLEAN,BOXED
VOID:ENUM,OBJECT
VOID:ENUM,OBJECT,OBJECT
VOID:INT,INT,INT
VOID:OBJECT,OBJECT
VOID:OBJECT,OBJECT,ENUM
VOID:OBJECT,OBJECT,STRING,STRING,VARIANT
VOID:OBJECT,OBJECT,VARIANT,BOXED
VOID:OBJECT,VARIANT
VOID:POINTER,INT,STRING
VOID:STRING,BOOLEAN
VOID:STRING,BOXED
VOID:STRING,BOXED,BOXED
VOID:STRING,INT64,INT64
VOID:STRING,STRING,STRING,FLAGS
VOID:STRING,STRING,VARIANT
VOID:STRING,VARIANT
VOID:UINT,UINT,UINT
VOID:VARIANT,BOXED
......@@ -22,6 +22,7 @@
#include "gmenumodel.h"
#include "glibintl.h"
#include "gmarshal-internal.h"
/**
* SECTION:gmenumodel
......@@ -452,8 +453,12 @@ g_menu_model_class_init (GMenuModelClass *class)
g_menu_model_items_changed_signal =
g_signal_new (I_("items-changed"), G_TYPE_MENU_MODEL,
G_SIGNAL_RUN_LAST, 0, NULL, NULL,
g_cclosure_marshal_generic, G_TYPE_NONE,
_g_cclosure_marshal_VOID__INT_INT_INT,
G_TYPE_NONE,
3, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
g_signal_set_va_marshaller (g_menu_model_items_changed_signal,
G_TYPE_FROM_CLASS (class),
_g_cclosure_marshal_VOID__INT_INT_INTv);
}
/**
......
......@@ -25,6 +25,7 @@
#include "gmountoperation.h"
#include "gioenumtypes.h"
#include "glibintl.h"
#include "gmarshal-internal.h"
/**
......@@ -321,9 +322,12 @@ g_mount_operation_class_init (GMountOperationClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GMountOperationClass, ask_password),
NULL, NULL,
NULL,
_g_cclosure_marshal_VOID__STRING_STRING_STRING_FLAGS,
G_TYPE_NONE, 4,
G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_ASK_PASSWORD_FLAGS);
g_signal_set_va_marshaller (signals[ASK_PASSWORD],
G_TYPE_FROM_CLASS (object_class),
_g_cclosure_marshal_VOID__STRING_STRING_STRING_FLAGSv);
/**
* GMountOperation::ask-question:
......@@ -344,9 +348,12 @@ g_mount_operation_class_init (GMountOperationClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GMountOperationClass, ask_question),
NULL, NULL,
NULL,
_g_cclosure_marshal_VOID__STRING_BOXED,
G_TYPE_NONE, 2,
G_TYPE_STRING, G_TYPE_STRV);
g_signal_set_va_marshaller (signals[ASK_QUESTION],
G_TYPE_FROM_CLASS (object_class),
_g_cclosure_marshal_VOID__STRING_BOXEDv);
/**
* GMountOperation::reply:
......@@ -414,9 +421,12 @@ g_mount_operation_class_init (GMountOperationClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GMountOperationClass, show_processes),
NULL, NULL,
NULL,
_g_cclosure_marshal_VOID__STRING_BOXED_BOXED,
G_TYPE_NONE, 3,
G_TYPE_STRING, G_TYPE_ARRAY, G_TYPE_STRV);
g_signal_set_va_marshaller (signals[SHOW_PROCESSES],
G_TYPE_FROM_CLASS (object_class),
_g_cclosure_marshal_VOID__STRING_BOXED_BOXEDv);
/**
* GMountOperation::show-unmount-progress:
......@@ -452,9 +462,13 @@ g_mount_operation_class_init (GMountOperationClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GMountOperationClass, show_unmount_progress),
NULL, NULL, NULL,
NULL, NULL,
_g_cclosure_marshal_VOID__STRING_INT64_INT64,
G_TYPE_NONE, 3,
G_TYPE_STRING, G_TYPE_INT64, G_TYPE_INT64);
g_signal_set_va_marshaller (signals[SHOW_UNMOUNT_PROGRESS],
G_TYPE_FROM_CLASS (object_class),
_g_cclosure_marshal_VOID__STRING_INT64_INT64v);
/**
* GMountOperation:username:
......
......@@ -30,6 +30,7 @@
#include "gsettings-mapping.h"
#include "gsettingsschema-internal.h"
#include "gaction.h"
#include "gmarshal-internal.h"
#include "strinfo.c"
......@@ -777,8 +778,11 @@ g_settings_class_init (GSettingsClass *class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GSettingsClass, change_event),
g_signal_accumulator_true_handled, NULL,
NULL,
_g_cclosure_marshal_BOOLEAN__POINTER_INT,
G_TYPE_BOOLEAN, 2, G_TYPE_POINTER, G_TYPE_INT);
g_signal_set_va_marshaller (g_settings_signals[SIGNAL_CHANGE_EVENT],
G_TYPE_FROM_CLASS (class),
_g_cclosure_marshal_BOOLEAN__POINTER_INTv);
/**
* GSettings::writable-changed:
......@@ -832,7 +836,11 @@ g_settings_class_init (GSettingsClass *class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GSettingsClass, writable_change_event),
g_signal_accumulator_true_handled, NULL,
NULL, G_TYPE_BOOLEAN, 1, G_TYPE_UINT);
_g_cclosure_marshal_BOOLEAN__UINT,
G_TYPE_BOOLEAN, 1, G_TYPE_UINT);
g_signal_set_va_marshaller (g_settings_signals[SIGNAL_WRITABLE_CHANGE_EVENT],
G_TYPE_FROM_CLASS (class),
_g_cclosure_marshal_BOOLEAN__UINTv);
/**
* GSettings:backend:
......
......@@ -49,6 +49,7 @@
#include <gio/gtlsclientconnection.h>
#include <gio/ginetaddress.h>
#include "glibintl.h"
#include "gmarshal-internal.h"
/* As recommended by RFC 8305 this is the time it waits
* on a connection before starting another concurrent attempt.
......@@ -832,11 +833,14 @@ g_socket_client_class_init (GSocketClientClass *class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GSocketClientClass, event),
NULL, NULL,
NULL,
_g_cclosure_marshal_VOID__ENUM_OBJECT_OBJECT,
G_TYPE_NONE, 3,
G_TYPE_SOCKET_CLIENT_EVENT,
G_TYPE_SOCKET_CONNECTABLE,
G_TYPE_IO_STREAM);
g_signal_set_va_marshaller (signals[EVENT],
G_TYPE_FROM_CLASS (class),
_g_cclosure_marshal_VOID__ENUM_OBJECT_OBJECTv);
g_object_class_install_property (gobject_class, PROP_FAMILY,
g_param_spec_enum ("family",
......
......@@ -36,6 +36,7 @@
#include <gio/gsocketconnection.h>
#include <gio/ginetsocketaddress.h>
#include "glibintl.h"
#include "gmarshal-internal.h"
/**
......@@ -181,10 +182,14 @@ g_socket_listener_class_init (GSocketListenerClass *klass)
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GSocketListenerClass, event),
NULL, NULL, NULL,
NULL, NULL,
_g_cclosure_marshal_VOID__ENUM_OBJECT,
G_TYPE_NONE, 2,
G_TYPE_SOCKET_LISTENER_EVENT,
G_TYPE_SOCKET);
g_signal_set_va_marshaller (signals[EVENT],
G_TYPE_FROM_CLASS (gobject_class),
_g_cclosure_marshal_VOID__ENUM_OBJECTv);
source_quark = g_quark_from_static_string ("g-socket-listener-source");
}
......
......@@ -64,6 +64,7 @@
#include "gsocketlistener.h"
#include "gsocketconnection.h"
#include "glibintl.h"
#include "gmarshal-internal.h"
struct _GSocketServicePrivate
{
......@@ -346,8 +347,12 @@ g_socket_service_class_init (GSocketServiceClass *class)
g_signal_new (I_("incoming"), G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GSocketServiceClass, incoming),
g_signal_accumulator_true_handled, NULL,
NULL, G_TYPE_BOOLEAN,
_g_cclosure_marshal_BOOLEAN__OBJECT_OBJECT,
G_TYPE_BOOLEAN,
2, G_TYPE_SOCKET_CONNECTION, G_TYPE_OBJECT);
g_signal_set_va_marshaller (g_socket_service_incoming_signal,
G_TYPE_FROM_CLASS (class),
_g_cclosure_marshal_BOOLEAN__OBJECT_OBJECTv);
/**
* GSocketService:active:
......
......@@ -48,6 +48,7 @@
#include "gsocketconnection.h"
#include "gthreadedsocketservice.h"
#include "glibintl.h"
#include "gmarshal-internal.h"
struct _GThreadedSocketServicePrivate
{
......@@ -238,8 +239,12 @@ g_threaded_socket_service_class_init (GThreadedSocketServiceClass *class)
g_signal_new (I_("run"), G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GThreadedSocketServiceClass, run),
g_signal_accumulator_true_handled, NULL,
NULL, G_TYPE_BOOLEAN,
_g_cclosure_marshal_BOOLEAN__OBJECT_OBJECT,
G_TYPE_BOOLEAN,
2, G_TYPE_SOCKET_CONNECTION, G_TYPE_OBJECT);
g_signal_set_va_marshaller (g_threaded_socket_service_run_signal,
G_TYPE_FROM_CLASS (class),
_g_cclosure_marshal_BOOLEAN__OBJECT_OBJECTv);
g_object_class_install_property (gobject_class, PROP_MAX_THREADS,
g_param_spec_int ("max-threads",
......
......@@ -29,6 +29,7 @@
#include "gtlsdatabase.h"
#include "gtlsinteraction.h"
#include "glibintl.h"
#include "gmarshal-internal.h"
/**
* SECTION:gtlsconnection
......@@ -345,10 +346,13 @@ g_tls_connection_class_init (GTlsConnectionClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GTlsConnectionClass, accept_certificate),
g_signal_accumulator_true_handled, NULL,
NULL,
_g_cclosure_marshal_BOOLEAN__OBJECT_FLAGS,
G_TYPE_BOOLEAN, 2,
G_TYPE_TLS_CERTIFICATE,
G_TYPE_TLS_CERTIFICATE_FLAGS);
g_signal_set_va_marshaller (signals[ACCEPT_CERTIFICATE],
G_TYPE_FROM_CLASS (klass),
_g_cclosure_marshal_BOOLEAN__OBJECT_FLAGSv);
}
static void
......
......@@ -526,6 +526,7 @@ gio_sources = files(
'gioscheduler.c',
'giostream.c',
'gloadableicon.c',
'gmarshal-internal.c',
'gmount.c',
'gmemoryinputstream.c',
'gmemoryoutputstream.c',
......@@ -1003,4 +1004,15 @@ subdir('fam')
build_tests = not meson.is_cross_build() or (meson.is_cross_build() and meson.has_exe_wrapper())
if build_tests
subdir('tests')
endif
\ No newline at end of file
endif
# The following is an example for building internal marshallers that are used
# by GIO. We cannot guarantee glib-genmarshal availability while building GLib
# so they are pre-generated and placed into gmarshal-internal.[ch].
#
# gmarshal_internal = gnome.genmarshal('gmarshal-internal',
# sources: 'gmarshal-internal.list',
# prefix: '_g_cclosure_marshal',
# valist_marshallers: true,
# internal: true,
# )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment