ekg2  GIT master
Definicje | Funkcje
Dokumentacja pliku perl_core.h
#include <EXTERN.h>
#include <perl.h>
#include <XSUB.h>
Wykres zależności załączania dla perl_core.h:
Ten wykres pokazuje, które pliki bezpośrednio lub pośrednio załączają ten plik:

Idź do kodu źródłowego tego pliku.

Definicje

#define PERL_CORE_H
 
#define fix(s)   ((s) ? (s) : "") /* xmalloc.h */
 
#define new_pv(a)   newSVpv(fix(a), xstrlen(a))
 
#define is_hvref(o)   ((o) && SvROK(o) && SvRV(o) && (SvTYPE(SvRV(o)) == SVt_PVHV))
 
#define hvref(o)   (is_hvref(o) ? (HV *)SvRV(o) : NULL)
 
#define PERL_HANDLER_HEADER(x)
 
#define RESTORE_ARGS(x)
 
#define PERL_HANDLER_FOOTER()
 
#define fix(s)   ((s) ? (s) : "") /* xmalloc.h */
 
#define new_pv(a)   newSVpv(fix(a), xstrlen(a))
 
#define is_hvref(o)   ((o) && SvROK(o) && SvRV(o) && (SvTYPE(SvRV(o)) == SVt_PVHV))
 
#define hvref(o)   (is_hvref(o) ? (HV *)SvRV(o) : NULL)
 
#define PERL_HANDLER_HEADER(x)
 
#define RESTORE_ARGS(x)   ;
 
#define PERL_HANDLER_FOOTER()
 

Funkcje

int perl_initialize ()
 
int perl_finalize ()
 
SV * create_sv_ptr (void *object)
 

Dokumentacja definicji

◆ fix [1/2]

#define fix (   s)    ((s) ? (s) : "") /* xmalloc.h */

◆ fix [2/2]

#define fix (   s)    ((s) ? (s) : "") /* xmalloc.h */

◆ hvref [1/2]

#define hvref (   o)    (is_hvref(o) ? (HV *)SvRV(o) : NULL)

◆ hvref [2/2]

#define hvref (   o)    (is_hvref(o) ? (HV *)SvRV(o) : NULL)

◆ is_hvref [1/2]

#define is_hvref (   o)    ((o) && SvROK(o) && SvRV(o) && (SvTYPE(SvRV(o)) == SVt_PVHV))

◆ is_hvref [2/2]

#define is_hvref (   o)    ((o) && SvROK(o) && SvRV(o) && (SvTYPE(SvRV(o)) == SVt_PVHV))

◆ new_pv [1/2]

#define new_pv (   a)    newSVpv(fix(a), xstrlen(a))

◆ new_pv [2/2]

#define new_pv (   a)    newSVpv(fix(a), xstrlen(a))

◆ PERL_CORE_H

#define PERL_CORE_H

◆ PERL_HANDLER_FOOTER [1/2]

#define PERL_HANDLER_FOOTER ( )
Wartość:
PUTBACK;\
/* perl_retcount = perl_call_sv(func, G_EVAL|G_DISCARD);*/\
perl_retcount = perl_call_pv(fullproc, G_EVAL);\
SPAGAIN;\
if (SvTRUE(ERRSV)) {\
error = SvPV(ERRSV, PL_na);\
print("script_error", error);\
}\
else if (perl_retcount > 0)\
{\
perl_ret = POPs;\
ret = SvIV(perl_ret);\
}\
RESTORE_ARGS(0);\
/* debug("%d %d\n", ret, perl_retcount); */\
\
PUTBACK;\
FREETMPS;\
LEAVE;\
\
if (ret < 0) return -1;\
else return ret; \
} /* closing tag defined in PERL_HANDLER_HEADER() macro */ \
xfree(fullproc);
#define xfree
Definition: testcase_for_remove_iter.c:34
#define SCRIPT_HANDLE_UNBIND
Definition: scripts.h:16

◆ PERL_HANDLER_FOOTER [2/2]

#define PERL_HANDLER_FOOTER ( )
Wartość:
PUTBACK;\
/* perl_retcount = perl_call_sv(func, G_EVAL|G_DISCARD);*/\
perl_retcount = perl_call_pv(fullproc, G_EVAL);\
SPAGAIN;\
if (SvTRUE(ERRSV)) {\
error = SvPV(ERRSV, PL_na);\
print("script_error", error);\
}\
else if (perl_retcount > 0)\
{\
perl_ret = POPs;\
ret = SvIV(perl_ret);\
}\
RESTORE_ARGS(0);\
/* debug("%d %d\n", ret, perl_retcount); */\
\
PUTBACK;\
FREETMPS;\
LEAVE;\
\
if (ret < 0) return -1;\
else return ret; \
} /* closing tag defined in PERL_HANDLER_HEADER() macro */ \
xfree(fullproc);
#define xfree
Definition: testcase_for_remove_iter.c:34
#define SCRIPT_HANDLE_UNBIND
Definition: scripts.h:16

◆ PERL_HANDLER_HEADER [1/2]

#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);\
{ /* tag will be closed in PERL_HANDLER_FOOTER macro */ \
dSP;\
ENTER;\
SAVETMPS;\
PUSHMARK(sp);
char * saprintf(const char *format,...)
Definition: stuff.c:2369

◆ PERL_HANDLER_HEADER [2/2]

#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);\
{ /* tag will be closed in PERL_HANDLER_FOOTER macro */ \
dSP;\
ENTER;\
SAVETMPS;\
PUSHMARK(sp);
char * saprintf(const char *format,...)
Definition: stuff.c:2369

◆ RESTORE_ARGS [1/2]

#define RESTORE_ARGS (   x)
Wartość:
if (change) {\
for (i=0; i < scr_que->argc; i++) {\
if (scr_que->argv_type[i] & QUERY_ARG_CONST)\
continue;\
switch ( scr_que->argv_type[i] & QUERY_ARG_TYPES ) {\
case (QUERY_ARG_INT):\
*( (int *) args[i]) = SvIV(SvRV(perlargs[i]));\
break;\
\
case (QUERY_ARG_CHARP):\
{\
char *retarg = xstrdup( SvPV_nolen(SvRV(perlargs[i])) ); \
if ( xstrcmp(retarg, *( (char **) args[i])) ) {\
xfree(*(char **) args[i]); \
*( (char **) args[i]) = retarg;\
xfree(retarg);\
break;\
}\
case (QUERY_ARG_CHARPP): /* wazne, zrobic. */\
break;\
\
}\
}\
}
Definition: queries.h:15
Definition: queries.h:31
int i
Definition: ekg_hash_benchmark.c:110
int xstrcmp(const char *s1, const char *s2)
Definition: ekg_hash_benchmark.c:27
Definition: queries.h:16
Definition: queries.h:14
#define xfree
Definition: testcase_for_remove_iter.c:34
char * xstrdup(const char *s)
Definition: ekg_hash_benchmark.c:28
Definition: queries.h:25

◆ RESTORE_ARGS [2/2]

#define RESTORE_ARGS (   x)    ;

Dokumentacja funkcji

◆ create_sv_ptr()

SV* create_sv_ptr ( void *  object)

◆ perl_finalize()

int perl_finalize ( )

◆ perl_initialize()

int perl_initialize ( )