Mojo-Base-XS
view release on metacpan or search on metacpan
void
accessor_init(self, ...)
SV *self;
ALIAS:
INIT:
/* Get the const hash key struct from the global storage */
/* ix is the magic integer variable that is set by the perl guts for us.
* We uses it to identify the currently running alias of the accessor. Gollum! */
const autoxs_hashkey readfrom = CXSAccessor_hashkeys[ix];
SV** svp;
PPCODE:
CXAH_OPTIMIZE_ENTERSUB(accessor);
ACCESSOR_BODY
void
accessor(self, ...)
SV* self;
ALIAS:
INIT:
/* Get the const hash key struct from the global storage */
/* ix is the magic integer variable that is set by the perl guts for us.
* We uses it to identify the currently running alias of the accessor. Gollum! */
const autoxs_hashkey readfrom = CXSAccessor_hashkeys[ix];
SV** svp;
PPCODE:
ACCESSOR_BODY
void
attr(caller_obj, name, ...)
SV *caller_obj;
SV *name;
PREINIT:
char *cstname = SvPV_nolen(PL_curstname);
SV *default_value = items > 2 ? ST(2) : NULL;
PUSHs(sv_2mortal(obj)); \
void
constructor_init(class, ...)
SV* class;
PREINIT:
int iStack;
HV* hash;
SV* obj;
const char* classname;
PPCODE:
CXAH_OPTIMIZE_ENTERSUB(constructor);
CONSTRUCTOR_BODY
void
constructor(class, ...)
SV* class;
PREINIT:
int iStack;
HV* hash;
SV* obj;
const char* classname;
PPCODE:
CONSTRUCTOR_BODY
void
newxs_constructor(name)
char* name;
PPCODE:
INSTALL_NEW_CV(name, CXAH(constructor_init));
void
newxs_attr(name)
char* name;
PPCODE:
INSTALL_NEW_CV(name, CXAH(attr));
( run in 0.797 second using v1.01-cache-2.11-cpan-5511b514fd6 )