soylent r265 - trunk/libsoylent
- From: svenp svn gnome org
- To: svn-commits-list gnome org
- Subject: soylent r265 - trunk/libsoylent
- Date: Mon, 4 Aug 2008 17:34:09 +0000 (UTC)
Author: svenp
Date: Mon Aug 4 17:34:09 2008
New Revision: 265
URL: http://svn.gnome.org/viewvc/soylent?rev=265&view=rev
Log:
added marshallers for various signal-handlers
added a script to generate marshallers
Added:
trunk/libsoylent/generate_marshallers (contents, props changed)
trunk/libsoylent/marshal.list
trunk/libsoylent/sl-marshal.c
trunk/libsoylent/sl-marshal.h
Modified:
trunk/libsoylent/Makefile.am
Modified: trunk/libsoylent/Makefile.am
==============================================================================
--- trunk/libsoylent/Makefile.am (original)
+++ trunk/libsoylent/Makefile.am Mon Aug 4 17:34:09 2008
@@ -13,20 +13,22 @@
sl-attribute.h \
sl-attribute-eds.h \
sl-attributes.h \
- sl-book.h \
- sl-group.h \
- sl-person.h \
- sl-priv-util.h \
- soylent.c \
- sl-entity.c \
+ sl-book.h \
+ sl-group.h \
+ sl-person.h \
+ sl-priv-util.h \
+ sl-marshal.h \
+ soylent.c \
+ sl-entity.c \
sl-entity-eds.c \
sl-attribute.c \
sl-attribute-eds.c \
sl-attributes.c \
- sl-book.c \
- sl-group.c \
- sl-person.c \
- sl-priv-util.c
+ sl-book.c \
+ sl-group.c \
+ sl-person.c \
+ sl-priv-util.c \
+ sl-marshal.c
libsoylent_la_CFLAGS = $(LIBSOYLENT_CFLAGS) $(WARN_CFLAGS)
libsoylent_la_LIBADD = $(LIBSOYLENT_LIBS)
Added: trunk/libsoylent/generate_marshallers
==============================================================================
--- (empty file)
+++ trunk/libsoylent/generate_marshallers Mon Aug 4 17:34:09 2008
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+glib-genmarshal --header --prefix=sl_marshal marshal.list > sl-marshal.h
+glib-genmarshal --body --prefix=sl_marshal marshal.list > sl-marshal.c
Added: trunk/libsoylent/marshal.list
==============================================================================
--- (empty file)
+++ trunk/libsoylent/marshal.list Mon Aug 4 17:34:09 2008
@@ -0,0 +1,3 @@
+VOID:OBJECT,BOOLEAN
+VOID:OBJECT,OBJECT,BOOLEAN
+VOID:OBJECT,OBJECT,POINTER,BOOLEAN
Added: trunk/libsoylent/sl-marshal.c
==============================================================================
--- (empty file)
+++ trunk/libsoylent/sl-marshal.c Mon Aug 4 17:34:09 2008
@@ -0,0 +1,168 @@
+
+#include "sl-marshal.h"
+
+#include <glib-object.h>
+
+
+#ifdef G_ENABLE_DEBUG
+#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
+#define g_marshal_value_peek_char(v) g_value_get_char (v)
+#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
+#define g_marshal_value_peek_int(v) g_value_get_int (v)
+#define g_marshal_value_peek_uint(v) g_value_get_uint (v)
+#define g_marshal_value_peek_long(v) g_value_get_long (v)
+#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v)
+#define g_marshal_value_peek_int64(v) g_value_get_int64 (v)
+#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v)
+#define g_marshal_value_peek_enum(v) g_value_get_enum (v)
+#define g_marshal_value_peek_flags(v) g_value_get_flags (v)
+#define g_marshal_value_peek_float(v) g_value_get_float (v)
+#define g_marshal_value_peek_double(v) g_value_get_double (v)
+#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v)
+#define g_marshal_value_peek_param(v) g_value_get_param (v)
+#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
+#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
+#define g_marshal_value_peek_object(v) g_value_get_object (v)
+#else /* !G_ENABLE_DEBUG */
+/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
+ * Do not access GValues directly in your code. Instead, use the
+ * g_value_get_*() functions
+ */
+#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int
+#define g_marshal_value_peek_char(v) (v)->data[0].v_int
+#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint
+#define g_marshal_value_peek_int(v) (v)->data[0].v_int
+#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint
+#define g_marshal_value_peek_long(v) (v)->data[0].v_long
+#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong
+#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64
+#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64
+#define g_marshal_value_peek_enum(v) (v)->data[0].v_long
+#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong
+#define g_marshal_value_peek_float(v) (v)->data[0].v_float
+#define g_marshal_value_peek_double(v) (v)->data[0].v_double
+#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer
+#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer
+#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
+#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
+#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
+#endif /* !G_ENABLE_DEBUG */
+
+
+/* VOID:OBJECT,BOOLEAN (marshal.list:1) */
+void
+sl_marshal_VOID__OBJECT_BOOLEAN (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__OBJECT_BOOLEAN) (gpointer data1,
+ gpointer arg_1,
+ gboolean arg_2,
+ gpointer data2);
+ register GMarshalFunc_VOID__OBJECT_BOOLEAN callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 3);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__OBJECT_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_object (param_values + 1),
+ g_marshal_value_peek_boolean (param_values + 2),
+ data2);
+}
+
+/* VOID:OBJECT,OBJECT,BOOLEAN (marshal.list:2) */
+void
+sl_marshal_VOID__OBJECT_OBJECT_BOOLEAN (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT_BOOLEAN) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gboolean arg_3,
+ gpointer data2);
+ register GMarshalFunc_VOID__OBJECT_OBJECT_BOOLEAN callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 4);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__OBJECT_OBJECT_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_object (param_values + 1),
+ g_marshal_value_peek_object (param_values + 2),
+ g_marshal_value_peek_boolean (param_values + 3),
+ data2);
+}
+
+/* VOID:OBJECT,OBJECT,POINTER,BOOLEAN (marshal.list:3) */
+void
+sl_marshal_VOID__OBJECT_OBJECT_POINTER_BOOLEAN (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT_POINTER_BOOLEAN) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gpointer arg_3,
+ gboolean arg_4,
+ gpointer data2);
+ register GMarshalFunc_VOID__OBJECT_OBJECT_POINTER_BOOLEAN callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+
+ g_return_if_fail (n_param_values == 5);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__OBJECT_OBJECT_POINTER_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ g_marshal_value_peek_object (param_values + 1),
+ g_marshal_value_peek_object (param_values + 2),
+ g_marshal_value_peek_pointer (param_values + 3),
+ g_marshal_value_peek_boolean (param_values + 4),
+ data2);
+}
+
Added: trunk/libsoylent/sl-marshal.h
==============================================================================
--- (empty file)
+++ trunk/libsoylent/sl-marshal.h Mon Aug 4 17:34:09 2008
@@ -0,0 +1,36 @@
+
+#ifndef __sl_marshal_MARSHAL_H__
+#define __sl_marshal_MARSHAL_H__
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+/* VOID:OBJECT,BOOLEAN (marshal.list:1) */
+extern void sl_marshal_VOID__OBJECT_BOOLEAN (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:OBJECT,OBJECT,BOOLEAN (marshal.list:2) */
+extern void sl_marshal_VOID__OBJECT_OBJECT_BOOLEAN (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+/* VOID:OBJECT,OBJECT,POINTER,BOOLEAN (marshal.list:3) */
+extern void sl_marshal_VOID__OBJECT_OBJECT_POINTER_BOOLEAN (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+
+G_END_DECLS
+
+#endif /* __sl_marshal_MARSHAL_H__ */
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]