#include <ekg/xmalloc.h>
#include <EXTERN.h>
#include <perl.h>
#include <XSUB.h>
Idź do kodu źródłowego tego pliku.
Dokumentacja definicji
#define fix |
( |
|
s |
) |
((s) ? (s) : "") |
#define fix |
( |
|
s |
) |
((s) ? (s) : "") |
#define hvref |
( |
|
o |
) |
(is_hvref(o) ? (HV *)SvRV(o) : NULL) |
#define hvref |
( |
|
o |
) |
(is_hvref(o) ? (HV *)SvRV(o) : NULL) |
#define is_hvref |
( |
|
o |
) |
((o) && SvROK(o) && SvRV(o) && (SvTYPE(SvRV(o)) == SVt_PVHV)) |
#define is_hvref |
( |
|
o |
) |
((o) && SvROK(o) && SvRV(o) && (SvTYPE(SvRV(o)) == SVt_PVHV)) |
#define new_pv |
( |
|
a |
) |
newSVpv(fix(a), xstrlen(a)) |
#define new_pv |
( |
|
a |
) |
newSVpv(fix(a), xstrlen(a)) |
#define PERL_HANDLER_FOOTER |
( |
|
) |
|
Wartość:PUTBACK;\
\
perl_retcount = perl_call_pv(fullproc, G_EVAL);\
SPAGAIN;\
if (SvTRUE(ERRSV)) {\
error = SvPV(ERRSV, PL_na);\
print("script_error", error);\
ret = SCRIPT_HANDLE_UNBIND;\
}\
else if (perl_retcount > 0)\
{\
perl_ret = POPs;\
ret = SvIV(perl_ret);\
}\
RESTORE_ARGS(0);\
\
\
PUTBACK;\
FREETMPS;\
LEAVE;\
\
if (ret < 0) return -1;\
else return ret; \
} \
xfree(fullproc);
#define PERL_HANDLER_FOOTER |
( |
|
) |
|
Wartość:PUTBACK;\
\
perl_retcount = perl_call_pv(fullproc, G_EVAL);\
SPAGAIN;\
if (SvTRUE(ERRSV)) {\
error = SvPV(ERRSV, PL_na);\
print("script_error", error);\
ret = SCRIPT_HANDLE_UNBIND;\
}\
else if (perl_retcount > 0)\
{\
perl_ret = POPs;\
ret = SvIV(perl_ret);\
}\
RESTORE_ARGS(0);\
\
\
PUTBACK;\
FREETMPS;\
LEAVE;\
\
if (ret < 0) return -1;\
else return ret; \
} \
xfree(fullproc);
#define PERL_HANDLER_HEADER |
( |
|
x |
) |
|
Wartość:char *fullproc, *error; \
int perl_retcount, ret = 0;\
SV *perl_ret;\
if (!x) return -1;\
fullproc = saprintf("Ekg2::Script::%s::%s", scr->name, x);\
{ \
dSP;\
ENTER;\
SAVETMPS;\
PUSHMARK(sp);
#define PERL_HANDLER_HEADER |
( |
|
x |
) |
|
Wartość:char *fullproc, *error; \
int perl_retcount, ret = 0;\
SV *perl_ret;\
if (!x) return -1;\
fullproc = saprintf("Ekg2::Script::%s::%s", scr->name, x);\
{ \
dSP;\
ENTER;\
SAVETMPS;\
PUSHMARK(sp);
#define RESTORE_ARGS |
( |
|
x |
) |
; |
#define RESTORE_ARGS |
( |
|
x |
) |
; |
Dokumentacja funkcji
SV* create_sv_ptr |
( |
void * |
object |
) |
|