[perl-Glib-Object-Introspection] Rename two internal functions for clarity
- From: Torsten SchÃnfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Glib-Object-Introspection] Rename two internal functions for clarity
- Date: Sun, 13 Jan 2013 21:53:51 +0000 (UTC)
commit 4858853f95b4707ac3eb11a1accc6fbfeff43608
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date: Sun Jan 13 22:53:45 2013 +0100
Rename two internal functions for clarity
GObjectIntrospection.xs | 55 +++++++++++++++++++++++----------------------
gperl-i11n-callback.c | 4 +-
gperl-i11n-invoke-c.c | 14 ++++++------
gperl-i11n-invoke-perl.c | 2 +-
4 files changed, 38 insertions(+), 37 deletions(-)
---
diff --git a/GObjectIntrospection.xs b/GObjectIntrospection.xs
index 7fcc6ab..8932bd8 100644
--- a/GObjectIntrospection.xs
+++ b/GObjectIntrospection.xs
@@ -84,7 +84,8 @@ typedef struct {
} GPerlI11nArrayInfo;
/* This stores information that the different marshallers might need to
- * communicate to each other. */
+ * communicate to each other. This struct is used for invoking C and Perl
+ * code. */
typedef struct {
GICallableInfo *interface;
const gchar *target_package;
@@ -147,18 +148,18 @@ static void invoke_perl_signal_handler (ffi_cif* cif,
gpointer userdata);
#endif
-static void invoke_callback (ffi_cif* cif,
- gpointer resp,
- gpointer* args,
- gpointer userdata);
-
-static void invoke_callable (GICallableInfo *info,
- gpointer func_pointer,
- SV **sp, I32 ax, SV **mark, I32 items, /* these correspond to dXSARGS */
- UV internal_stack_offset,
- const gchar *package,
- const gchar *namespace,
- const gchar *function);
+static void invoke_perl_code (ffi_cif* cif,
+ gpointer resp,
+ gpointer* args,
+ gpointer userdata);
+
+static void invoke_c_code (GICallableInfo *info,
+ gpointer func_pointer,
+ SV **sp, I32 ax, SV **mark, I32 items, /* these correspond to dXSARGS */
+ UV internal_stack_offset,
+ const gchar *package,
+ const gchar *namespace,
+ const gchar *function);
static gpointer allocate_out_mem (GITypeInfo *arg_type);
static void handle_automatic_arg (guint pos,
GIArgument * arg,
@@ -794,11 +795,11 @@ _invoke_fallback_vfunc (class, vfunc_package, vfunc_name, target_package, ...)
field_offset = g_field_info_get_offset (field_info);
func_pointer = G_STRUCT_MEMBER (gpointer, klass, field_offset);
g_assert (func_pointer);
- invoke_callable (vfunc_info, func_pointer,
- sp, ax, mark, items,
- internal_stack_offset,
- NULL, NULL, NULL);
- /* SPAGAIN since invoke_callable probably modified the stack
+ invoke_c_code (vfunc_info, func_pointer,
+ sp, ax, mark, items,
+ internal_stack_offset,
+ NULL, NULL, NULL);
+ /* SPAGAIN since invoke_c_code probably modified the stack
* pointer. so we need to make sure that our local variable
* 'sp' is correct before the implicit PUTBACK happens. */
SPAGAIN;
@@ -905,11 +906,11 @@ invoke (class, basename, namespace, function, ...)
{
ccroak ("Could not locate symbol %s", symbol);
}
- invoke_callable (info, func_pointer,
- sp, ax, mark, items,
- internal_stack_offset,
- get_package_for_basename (basename), namespace, function);
- /* SPAGAIN since invoke_callable probably modified the stack pointer.
+ invoke_c_code (info, func_pointer,
+ sp, ax, mark, items,
+ internal_stack_offset,
+ get_package_for_basename (basename), namespace, function);
+ /* SPAGAIN since invoke_c_code probably modified the stack pointer.
* so we need to make sure that our implicit local variable 'sp' is
* correct before the implicit PUTBACK happens. */
SPAGAIN;
@@ -957,10 +958,10 @@ _invoke (SV *code, ...)
wrapper = INT2PTR (GPerlI11nCCallbackInfo*, SvIV (SvRV (code)));
if (!wrapper || !wrapper->func)
ccroak ("invalid reference encountered");
- invoke_callable (wrapper->interface, wrapper->func,
- sp, ax, mark, items,
- internal_stack_offset,
- NULL, NULL, NULL);
+ invoke_c_code (wrapper->interface, wrapper->func,
+ sp, ax, mark, items,
+ internal_stack_offset,
+ NULL, NULL, NULL);
void
DESTROY (SV *code)
diff --git a/gperl-i11n-callback.c b/gperl-i11n-callback.c
index 0087f84..76ac91f 100644
--- a/gperl-i11n-callback.c
+++ b/gperl-i11n-callback.c
@@ -13,7 +13,7 @@ create_perl_callback_closure (GICallableInfo *cb_info, SV *code)
info->cif = g_new0 (ffi_cif, 1);
info->closure =
g_callable_info_prepare_closure (info->interface, info->cif,
- invoke_callback, info);
+ invoke_perl_code, info);
/* FIXME: This should most likely use SvREFCNT_inc instead of
* newSVsv. */
info->code = newSVsv (code);
@@ -49,7 +49,7 @@ create_perl_callback_closure_for_named_sub (GICallableInfo *cb_info, gchar *sub_
info->cif = g_new0 (ffi_cif, 1);
info->closure =
g_callable_info_prepare_closure (info->interface, info->cif,
- invoke_callback, info);
+ invoke_perl_code, info);
info->sub_name = sub_name;
info->code = NULL;
info->data = NULL;
diff --git a/gperl-i11n-invoke-c.c b/gperl-i11n-invoke-c.c
index 154601e..179f42e 100644
--- a/gperl-i11n-invoke-c.c
+++ b/gperl-i11n-invoke-c.c
@@ -45,13 +45,13 @@ check_n_args (GPerlI11nInvocationInfo *iinfo)
}
static void
-invoke_callable (GICallableInfo *info,
- gpointer func_pointer,
- SV **sp, I32 ax, SV **mark, I32 items, /* these correspond to dXSARGS */
- UV internal_stack_offset,
- const gchar *package,
- const gchar *namespace,
- const gchar *function)
+invoke_c_code (GICallableInfo *info,
+ gpointer func_pointer,
+ SV **sp, I32 ax, SV **mark, I32 items, /* these correspond to dXSARGS */
+ UV internal_stack_offset,
+ const gchar *package,
+ const gchar *namespace,
+ const gchar *function)
{
ffi_cif cif;
gpointer instance = NULL;
diff --git a/gperl-i11n-invoke-perl.c b/gperl-i11n-invoke-perl.c
index 2c45d14..92fdc2b 100644
--- a/gperl-i11n-invoke-perl.c
+++ b/gperl-i11n-invoke-perl.c
@@ -1,7 +1,7 @@
/* -*- mode: c; indent-tabs-mode: t; c-basic-offset: 8; -*- */
static void
-invoke_callback (ffi_cif* cif, gpointer resp, gpointer* args, gpointer userdata)
+invoke_perl_code (ffi_cif* cif, gpointer resp, gpointer* args, gpointer userdata)
{
GPerlI11nPerlCallbackInfo *info;
GICallableInfo *cb_interface;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]