gperl-private.h | gperl-private.h | |||
---|---|---|---|---|
skipping to change at line 41 | skipping to change at line 41 | |||
GThread * _gperl_get_main_tid (void); | GThread * _gperl_get_main_tid (void); | |||
#endif | #endif | |||
/* | /* | |||
* Misc. stuff | * Misc. stuff | |||
*/ | */ | |||
SV * _gperl_sv_from_value_internal (const GValue * value, gboolean copy_box ed); | SV * _gperl_sv_from_value_internal (const GValue * value, gboolean copy_box ed); | |||
SV * _gperl_fetch_wrapper_key (GObject * object, const char * name, gboolea n create); | SV * _gperl_fetch_wrapper_key (GObject * object, const char * name, gboolea n create); | |||
#define SAVED_STACK_SV(expr) \ | ||||
({ \ | ||||
SV *_saved_stack_sv; \ | ||||
PUTBACK; \ | ||||
_saved_stack_sv = expr; \ | ||||
SPAGAIN; \ | ||||
_saved_stack_sv; \ | ||||
}) | ||||
#define SAVED_STACK_PUSHs(expr) \ | ||||
(void) ({ \ | ||||
SV *_saved_stack_sv = SAVED_STACK_SV (expr); \ | ||||
PUSHs (_saved_stack_sv); \ | ||||
}) | ||||
#define SAVED_STACK_XPUSHs(expr) \ | ||||
(void) ({ \ | ||||
SV *_saved_stack_sv = SAVED_STACK_SV (expr); \ | ||||
XPUSHs (_saved_stack_sv); \ | ||||
}) | ||||
#endif /* _GPERL_PRIVATE_H_ */ | #endif /* _GPERL_PRIVATE_H_ */ | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 19 lines changed or added | |||
gperl.h | gperl.h | |||
---|---|---|---|---|
skipping to change at line 164 | skipping to change at line 164 | |||
GPerlBoxedUnwrapFunc unwrap; | GPerlBoxedUnwrapFunc unwrap; | |||
GPerlBoxedDestroyFunc destroy; | GPerlBoxedDestroyFunc destroy; | |||
}; | }; | |||
GPerlBoxedWrapperClass * gperl_default_boxed_wrapper_class (void); | GPerlBoxedWrapperClass * gperl_default_boxed_wrapper_class (void); | |||
void gperl_register_boxed (GType gtype, | void gperl_register_boxed (GType gtype, | |||
const char * package, | const char * package, | |||
GPerlBoxedWrapperClass * wrapper_class); | GPerlBoxedWrapperClass * wrapper_class); | |||
void gperl_register_boxed_alias (GType gtype, const char * package); | void gperl_register_boxed_alias (GType gtype, const char * package); | |||
void gperl_register_boxed_synonym (GType registered_gtype, GType synonym_gt ype); | ||||
SV * gperl_new_boxed (gpointer boxed, GType gtype, gboolean own); | SV * gperl_new_boxed (gpointer boxed, GType gtype, gboolean own); | |||
SV * gperl_new_boxed_copy (gpointer boxed, GType gtype); | SV * gperl_new_boxed_copy (gpointer boxed, GType gtype); | |||
gpointer gperl_get_boxed_check (SV * sv, GType gtype); | gpointer gperl_get_boxed_check (SV * sv, GType gtype); | |||
GType gperl_boxed_type_from_package (const char * package); | GType gperl_boxed_type_from_package (const char * package); | |||
const char * gperl_boxed_package_from_type (GType type); | const char * gperl_boxed_package_from_type (GType type); | |||
/* | /* | |||
* GObject | * GObject | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
gperl_marshal.h | gperl_marshal.h | |||
---|---|---|---|---|
skipping to change at line 129 | skipping to change at line 129 | |||
I<param_values> is the array of GValues passed into your marshaller. | I<param_values> is the array of GValues passed into your marshaller. | |||
Note that the instance comes from param_values[0], so you needn't worry | Note that the instance comes from param_values[0], so you needn't worry | |||
about that one when putting the rest of the parameters on the arg stack. | about that one when putting the rest of the parameters on the arg stack. | |||
This assumes that n_param_values > 1. | This assumes that n_param_values > 1. | |||
=cut | =cut | |||
*/ | */ | |||
/* note -- keep an eye on the refcounts of instance and data! */ | /* note -- keep an eye on the refcounts of instance and data! */ | |||
#define GPERL_CLOSURE_MARSHAL_PUSH_INSTANCE(param_values) \ | #define GPERL_CLOSURE_MARSHAL_PUSH_INSTANCE(param_values) \ | |||
PUTBACK; \ | ||||
if (GPERL_CLOSURE_SWAP_DATA (pc)) { \ | if (GPERL_CLOSURE_SWAP_DATA (pc)) { \ | |||
/* swap instance and data */ \ | /* swap instance and data */ \ | |||
data = gperl_sv_from_value (param_values); \ | data = gperl_sv_from_value (param_values); \ | |||
instance = SvREFCNT_inc (pc->data); \ | instance = SvREFCNT_inc (pc->data); \ | |||
} else { \ | } else { \ | |||
/* normal */ \ | /* normal */ \ | |||
instance = gperl_sv_from_value (param_values); \ | instance = gperl_sv_from_value (param_values); \ | |||
data = SvREFCNT_inc (pc->data); \ | data = SvREFCNT_inc (pc->data); \ | |||
} \ | } \ | |||
SPAGAIN; \ | ||||
if (!instance) \ | if (!instance) \ | |||
instance = &PL_sv_undef; \ | instance = &PL_sv_undef; \ | |||
/* the instance is always the first item in @_ */ \ | /* the instance is always the first item in @_ */ \ | |||
XPUSHs (sv_2mortal (instance)); | XPUSHs (sv_2mortal (instance)); | |||
/* | /* | |||
=item GPERL_CLOSURE_MARSHAL_PUSH_DATA | =item GPERL_CLOSURE_MARSHAL_PUSH_DATA | |||
Push the callback's user data onto the Perl arg stack, with XPUSHs. Handle s | Push the callback's user data onto the Perl arg stack, with XPUSHs. Handle s | |||
the case of swapped instance and data. The user data is not included in | the case of swapped instance and data. The user data is not included in | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 2 lines changed or added | |||