Result:
found more than 1151 distributions - search limited to the first 2001 files matching your query ( run in 1.656 )


Dua

 view release on metacpan or  search on metacpan

Dua.xs  view on Meta::CPAN

int scope
int all
PREINIT:
  atlist_t *	atlist;
  register atlist_t *temp;
PPCODE:
  atlist = (atlist_t *) 0;
  dua_find(session,rdn,filter,scope,1,all,&atlist);
  temp = atlist;
  while (temp != NULL) 
  {

Dua.xs  view on Meta::CPAN

ldap_session_t *session
char *rdn
PREINIT:
  atlist_t *	atlist;
  register atlist_t *temp;
PPCODE:
  atlist = (atlist_t *) 0;
  dua_find(session,rdn,NULL,0,0,0,&atlist);
  temp = atlist;
  while (temp != NULL) 
  {

Dua.xs  view on Meta::CPAN


  struct berval **values;
  char **attribute;
  LDAPMessage *result, *entry;
  int i;
PPCODE:

  attrs[0] = attr;
  attrs[1] = NULL;
  if (ldap_search_s(session->dua_ld,rdn,scope,filter,attrs,attrsonly,&result)
      != LDAP_SUCCESS) {

 view all matches for this distribution


Dyn

 view release on metacpan or  search on metacpan

lib/Dyn/Call/Aggregate.xsh  view on Meta::CPAN

void
fields(DCaggr * thing)
PREINIT:
    size_t i;
    U8 gimme = GIMME_V;
PPCODE:
    // clang-format on
    if (gimme == G_ARRAY) {
    EXTEND(SP, thing->n_fields);
    struct DCfield_ *addr;
    for (i = 0; i < thing->n_fields; ++i) {

 view all matches for this distribution


EFL

 view release on metacpan or  search on metacpan

Ecore/ecore-const-xs.inc  view on Meta::CPAN

	/* NV		nv;	Uncomment this if you need to return NVs */
	/* const char	*pv;	Uncomment this if you need to return PVs */
    INPUT:
	SV *		sv;
        const char *	s = SvPV(sv, len);
    PPCODE:
        /* Change this to constant(aTHX_ s, len, &iv, &nv);
           if you need to return both NVs and IVs */
	type = constant(aTHX_ s, len, &iv);
      /* Return 1 or 2 items. First is error message, or undef if no error.
           Second, if present, is found value */

 view all matches for this distribution


EV-ADNS

 view release on metacpan or  search on metacpan

ADNS.xs  view on Meta::CPAN

        adns_finish (ads);
        adns_init_logfn (&ads, initflags, SvOK (str) ? SvPVbyte_nolen (str) : 0, 0, 0);
}

void submit (char *owner, int type, int flags, SV *cb)
	PPCODE:
{
        SV *csv = NEWSV (0, sizeof (struct ctx));
	struct ctx *c = (struct ctx *)SvPVX (csv);
        int r = adns_submit (ads, owner, type, flags, (void *)c, &c->query);

 view all matches for this distribution


EV-Gearman

 view release on metacpan or  search on metacpan

src/EV__Gearman.xs  view on Meta::CPAN

# Internal: current (read, write) buffer capacities in bytes. Used by
# the test suite to assert that oversized buffers are released after a
# large packet drains. Not part of the public API.
void
_buf_caps(EV::Gearman self)
PPCODE:
{
    EXTEND(SP, 2);
    mPUSHu(self->rbuf_cap);
    mPUSHu(self->wbuf_cap);
}

 view all matches for this distribution


EV-Kafka

 view release on metacpan or  search on metacpan

src/EV__Kafka.xs  view on Meta::CPAN

        kf_buf_free(&body);
    }

void
api_versions(EV::Kafka::Conn self)
    PPCODE:
    {
        if (!self->api_versions_known)
            XSRETURN_UNDEF;

        HV *hv = newHV();

src/EV__Kafka.xs  view on Meta::CPAN

    OUTPUT:
        RETVAL

void
_error_name(int code)
    PPCODE:
    {
        const char *name = NULL;
        switch (code) {
            case  0: name = "NONE"; break;
            case  1: name = "OFFSET_OUT_OF_RANGE"; break;

 view all matches for this distribution


EV-Loop-Async

 view release on metacpan or  search on metacpan

Async.xs  view on Meta::CPAN

        CvNODEBUG_on (get_cv ("EV::Loop::Async::scope_lock", 0)); /* otherwise calling scope can be the debugger */
}

void
_c_func (SV *loop)
	PPCODE:
        EXTEND (SP, 2);
        PUSHs (sv_2mortal (newSViv (PTR2IV (c_func))));
        PUSHs (sv_2mortal (newSViv (SvIVX (SvRV (loop)))));

void

 view all matches for this distribution


EV-Nats

 view release on metacpan or  search on metacpan

src/EV__Nats.xs  view on Meta::CPAN

    RETVAL

void
on_error(self, ...)
    EV::Nats self
  PPCODE:
    if (items > 1) {
        CLEAR_HANDLER(self->on_error);
        if (SvOK(ST(1)))
            self->on_error = newSVsv(ST(1));
    }

src/EV__Nats.xs  view on Meta::CPAN

        PUSHs(sv_2mortal(newSVsv(self->on_error)));

void
on_connect(self, ...)
    EV::Nats self
  PPCODE:
    if (items > 1) {
        CLEAR_HANDLER(self->on_connect);
        if (SvOK(ST(1)))
            self->on_connect = newSVsv(ST(1));
    }

src/EV__Nats.xs  view on Meta::CPAN

        PUSHs(sv_2mortal(newSVsv(self->on_connect)));

void
on_disconnect(self, ...)
    EV::Nats self
  PPCODE:
    if (items > 1) {
        CLEAR_HANDLER(self->on_disconnect);
        if (SvOK(ST(1)))
            self->on_disconnect = newSVsv(ST(1));
    }

src/EV__Nats.xs  view on Meta::CPAN

#endif

void
stats(self)
    EV::Nats self
  PPCODE:
    EXTEND(SP, 8);
    PUSHs(sv_2mortal(newSVpvs("msgs_in")));
    PUSHs(sv_2mortal(newSVuv(self->msgs_in)));
    PUSHs(sv_2mortal(newSVpvs("msgs_out")));
    PUSHs(sv_2mortal(newSVuv(self->msgs_out)));

src/EV__Nats.xs  view on Meta::CPAN

        self->on_slow_consumer = newSVsv(cb);

void
on_lame_duck(self, ...)
    EV::Nats self
  PPCODE:
    if (items > 1) {
        CLEAR_HANDLER(self->on_ldm);
        if (SvOK(ST(1)))
            self->on_ldm = newSVsv(ST(1));
    }

 view all matches for this distribution


EV-Pg

 view release on metacpan or  search on metacpan

Pg.xs  view on Meta::CPAN

OUTPUT:
    RETVAL

void
ssl_attribute_names(EV::Pg self)
PPCODE:
{
    const char * const *names;
    AV *av;
    int i;

 view all matches for this distribution


EV-Websockets

 view release on metacpan or  search on metacpan

Websockets.xs  view on Meta::CPAN

OUTPUT:
    RETVAL

void
connections(EV::Websockets::Context self);
PPCODE:
{
    ev_ws_conn_t* conn;
    if (self->magic != EV_WS_CTX_MAGIC) XSRETURN_EMPTY;
    for (conn = self->connections; conn != NULL; conn = conn->next) {
        /* "connected" stays set during the "closing" drain (close() never

 view all matches for this distribution


EV-cares

 view release on metacpan or  search on metacpan

cares.xs  view on Meta::CPAN

    }
}

void
new(class, ...)
PPCODE:
{
    const char *class_name = SvPV_nolen(ST(0));
    ev_cares_t *self;
    struct ares_options opts;
    int optmask = 0;

cares.xs  view on Meta::CPAN

}

void
servers(self)
    EV::cares self
PPCODE:
{
    char *csv;
    REQUIRE_LIVE(self);
    csv = ares_get_servers_csv(self->channel);
    if (!csv) croak("EV::cares::servers: ares_get_servers_csv failed");

 view all matches for this distribution


EV

 view release on metacpan or  search on metacpan

EV.xs  view on Meta::CPAN


void prev (ev_stat *w)
	ALIAS:
        stat = 1
        attr = 2
	PPCODE:
{
	ev_statdata *s = ix ? &w->attr : &w->prev;

        if (ix == 1)
          ev_stat_stat (e_loop (w), w);

 view all matches for this distribution


Eixo-Zone-Driver

 view release on metacpan or  search on metacpan

Driver.xs  view on Meta::CPAN


SV * mi_setns(fichero, tipo_ns)

	InputStream	fichero
	int	tipo_ns
PPCODE:
		
	int fd = -1;
	
	ST(0) = sv_newmortal();
	

Driver.xs  view on Meta::CPAN



SV * mi_unshare(flags)

	int flags
PPCODE:

	ST(0) = sv_newmortal();

	if(unshare(flags) == 0)
		XPUSHs(sv_2mortal(newSVnv(0)));

Driver.xs  view on Meta::CPAN

	OUTPUT:
        RETVAL

#include <sys/vfs.h>
void mi_caps()
	PPCODE:

		cap_t caps;

		caps = cap_get_proc();
	

 view all matches for this distribution


Email-Address-XS

 view release on metacpan or  search on metacpan

Email-Address-XS.xs  view on Meta::CPAN

INIT:
	if (items % 2 == 1) {
		carp(CARP_WARN, "Odd number of elements in argument list");
		XSRETURN_UNDEF;
	}
PPCODE:
	first_address = NULL;
	last_address = NULL;
	taint = false;
#ifndef WITHOUT_SvPV_nomg
	utf8 = false;

Email-Address-XS.xs  view on Meta::CPAN

	hv_class = get_perl_class_from_perl_scalar_or_cv(aTHX_ class_scalar, cv);
	if (class_scalar && !sv_derived_from_pvn(class_scalar, this_class_name, this_class_len, SVf_UTF8)) {
		carp(CARP_WARN, "Class %" SVf " is not derived from %s", SVfARG(class_scalar), this_class_name);
		XSRETURN_EMPTY;
	}
PPCODE:
	first_address = message_address_parse(input, input_len, UINT_MAX, MESSAGE_ADDRESS_PARSE_FLAG_NON_STRICT_DOTS_AS_INVALID);
	count = count_address_groups(first_address);
	EXTEND(SP, count * 2);
	address = first_address;
	while (get_next_perl_address_group(aTHX_ &address, &group_scalar, &addresses_scalar, hv_class, utf8, taint)) {

Email-Address-XS.xs  view on Meta::CPAN

	if (utf8 && !mailbox_utf8)
		mailbox = get_perl_scalar_value(aTHX_ mailbox_scalar, &mailbox_len, true, true);
	if (utf8 && !domain_utf8)
		domain = get_perl_scalar_value(aTHX_ domain_scalar, &domain_len, true, true);
	taint = (SvTAINTED(mailbox_scalar) || SvTAINTED(domain_scalar));
PPCODE:
	compose_address(&string, &string_len, mailbox, mailbox_len, domain, domain_len);
	string_scalar = sv_2mortal(newSVpvn(string, string_len));
	string_free(string);
	if (utf8)
		sv_utf8_decode(string_scalar);

Email-Address-XS.xs  view on Meta::CPAN

INIT:
	string_scalar = items >= 1 ? ST(0) : &PL_sv_undef;
	string = get_perl_scalar_string_value(aTHX_ string_scalar, &string_len, "string", false);
	utf8 = SvUTF8(string_scalar);
	taint = SvTAINTED(string_scalar);
PPCODE:
	split_address(string, string_len, &mailbox, &mailbox_len, &domain, &domain_len);
	mailbox_scalar = mailbox ? sv_2mortal(newSVpvn(mailbox, mailbox_len)) : sv_newmortal();
	domain_scalar = domain ? sv_2mortal(newSVpvn(domain, domain_len)) : sv_newmortal();
	string_free(mailbox);
	string_free(domain);

 view all matches for this distribution


Embperl

 view release on metacpan or  search on metacpan

DOM.xs  view on Meta::CPAN

    SV *     sText
PREINIT:
    STRLEN l ;
    char * s  ;
    tReq * r = CurrReq ;
PPCODE:
    if (!r)
	 Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ; 
    RETVAL = NULL ; /* avoid warning */
    SvGETMAGIC_P4(sText) ;
    s = SV2String (sText, l) ;

DOM.xs  view on Meta::CPAN

    SV * sText
PREINIT:
    STRLEN l ;
    char * s  ;
    tReq * r = CurrReq ;
PPCODE:
    if (!r)
	 Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ; 
    RETVAL = NULL ; /* avoid warning */
    SvGETMAGIC_P4(sText) ;
    s = SV2String (sText, l) ;

DOM.xs  view on Meta::CPAN

    SV * sText
PREINIT:
    STRLEN l ;
    char * s  ;
    tReq * r = CurrReq ;
PPCODE:
    if (!r)
	 Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ; 
    RETVAL = NULL ; /* avoid warning */
    r -> Component.bSubNotEmpty = 1 ;
    SvGETMAGIC_P4(sText) ;

DOM.xs  view on Meta::CPAN

    char * sId
PREINIT:
    STRLEN l ;
    const char * s  ;
    tReq * r = CurrReq ;
PPCODE:
    if (!r)
	 Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ; 
    r -> Component.bSubNotEmpty = 1 ;
    s = embperl_GetText (r, sId) ;
    l = strlen (s) ;

DOM.xs  view on Meta::CPAN

    tDomNode * pDomNode
    SV * sText
PREINIT:
    SV * sRet  ;
    tReq * r = CurrReq ;
PPCODE:
    if (!r)
	 Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ; 
    RETVAL = NULL ; /* avoid warning */
    SvGETMAGIC_P4(sText) ;
    sRet = Node_replaceChildWithUrlDATA (r, pDomNode -> xDomTree, pDomNode -> xNode, r -> Component.nCurrRepeatLevel, sText) ;

DOM.xs  view on Meta::CPAN

    int xOldChild
    SV * sText
PREINIT:
    SV * sRet  ;
    tReq * r = CurrReq ;
PPCODE:
    if (!r)
	 Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ; 
    RETVAL = NULL ; /* avoid warning */
    r -> Component.bSubNotEmpty = 1 ;
    SvGETMAGIC_P4(sText) ;

 view all matches for this distribution


Encode-TECkit

 view release on metacpan or  search on metacpan

TECkit.xs  view on Meta::CPAN

        TECkit_Status   hr;
        PerlIO *infile;
        long    filelen;
        Byte    *fBuff;
        SV      *mySv;
    PPCODE:
        if (style & 1)
            sourceForm = kForm_UTF8;
        else
            sourceForm = kForm_Bytes;
        if (style & 2)

TECkit.xs  view on Meta::CPAN

        UInt16  targetForm;
        TECkit_Status   hr;
        Byte   *fBuff;
        STRLEN  filelen;
        SV     *mySv;
    PPCODE:
        if (style & 1)
            sourceForm = kForm_UTF8;
        else
            sourceForm = kForm_Bytes;
        if (style & 2)

 view all matches for this distribution


Encode

 view release on metacpan or  search on metacpan

Encode.xs  view on Meta::CPAN

INIT:
    SvGETMAGIC(src);
    SvGETMAGIC(check_sv);
    check = SvROK(check_sv) ? ENCODE_PERLQQ|ENCODE_LEAVE_SRC : SvOK(check_sv) ? SvIV_nomg(check_sv) : 0;
    modify = (check && !(check & ENCODE_LEAVE_SRC));
PPCODE:
    if (!SvOK(src))
        XSRETURN_UNDEF;
    s = modify ? (U8 *)SvPV_force_nomg(src, slen) : (U8 *)SvPV_nomg(src, slen);
    if (SvUTF8(src))
        utf8_safe_downgrade(aTHX_ &src, &s, &slen, modify);

Encode.xs  view on Meta::CPAN

INIT:
    SvGETMAGIC(src);
    SvGETMAGIC(check_sv);
    check = SvROK(check_sv) ? ENCODE_PERLQQ|ENCODE_LEAVE_SRC : SvOK(check_sv) ? SvIV_nomg(check_sv) : 0;
    modify = (check && !(check & ENCODE_LEAVE_SRC));
PPCODE:
    if (!SvOK(src))
        XSRETURN_UNDEF;
    s = modify ? (U8 *)SvPV_force_nomg(src, slen) : (U8 *)SvPV_nomg(src, slen);
    e = s+slen;
    dst = sv_2mortal(newSV(slen>0?slen:1)); /* newSV() abhors 0 -- inaba */

 view all matches for this distribution


Encoding-FixLatin-XS

 view release on metacpan or  search on metacpan

XS.xs  view on Meta::CPAN

SV *
_fix_latin_xs(source, overlong_fatal, ascii_hex)
        SV *  source
        int   overlong_fatal
        int   ascii_hex
    PPCODE:
        ST(0) = _encoding_fix_latin_xs(source, overlong_fatal, ascii_hex);
        XSRETURN(1);

 view all matches for this distribution


Env-C

 view release on metacpan or  search on metacpan

C.xs  view on Meta::CPAN


MODULE = Env::C        PACKAGE = Env::C  PREFIX = env_c_

void
env_c_setenv_multi(...)
    PPCODE:
    int i;
    if (items % 3)
        croak("Usage: setenv_multi(var1, value1, override1, var2, value2, override2, ...)");
    for (i=0; i<items; i+=3)
        __setenv(SvPV_nolen(ST(i)), SvPV_nolen(ST(i+1)), SvIV(ST(i+2)));

C.xs  view on Meta::CPAN


MODULE = Env::C        PACKAGE = Env::C  PREFIX = env_c_

void
env_c_unsetenv_multi(...)
    PPCODE:
    int i;
    for (i=0; i<items; i++)
        __unsetenv(SvPV_nolen(ST(i)));
    XSRETURN(0);

 view all matches for this distribution


Erlang-Interface

 view release on metacpan or  search on metacpan

fallback/const-xs.inc  view on Meta::CPAN

	/* NV		nv;	Uncomment this if you need to return NVs */
	/* const char	*pv;	Uncomment this if you need to return PVs */
    INPUT:
	SV *		sv;
        const char *	s = SvPV(sv, len);
    PPCODE:
        /* Change this to constant(aTHX_ s, len, &iv, &nv);
           if you need to return both NVs and IVs */
	type = constant(aTHX_ s, len, &iv);
      /* Return 1 or 2 items. First is error message, or undef if no error.
           Second, if present, is found value */

 view all matches for this distribution


Eshu

 view release on metacpan or  search on metacpan

include/eshu_xs.h  view on Meta::CPAN

	while (p < eol && (*p == ' ' || *p == '\t')) p++;
	return (p < eol && *p == '=');
}

/* XS labels: CODE, INIT, OUTPUT, PREINIT, CLEANUP, POSTCALL,
 * PPCODE, BOOT, CASE, INTERFACE, INTERFACE_MACRO, PROTOTYPES,
 * VERSIONCHECK, INCLUDE, FALLBACK, OVERLOAD, ALIAS, ATTRS */
static int eshu_xs_is_label(const char *content, const char *eol,
                            int *is_boot) {
	const char *p = content;
	const char *start;

include/eshu_xs.h  view on Meta::CPAN

	    (len == 4 && memcmp(start, "INIT", 4) == 0) ||
	    (len == 6 && memcmp(start, "OUTPUT", 6) == 0) ||
	    (len == 7 && memcmp(start, "PREINIT", 7) == 0) ||
	    (len == 7 && memcmp(start, "CLEANUP", 7) == 0) ||
	    (len == 8 && memcmp(start, "POSTCALL", 8) == 0) ||
	    (len == 6 && memcmp(start, "PPCODE", 6) == 0) ||
	    (len == 4 && memcmp(start, "CASE", 4) == 0) ||
	    (len == 9 && memcmp(start, "INTERFACE", 9) == 0) ||
	    (len == 15 && memcmp(start, "INTERFACE_MACRO", 15) == 0) ||
	    (len == 10 && memcmp(start, "PROTOTYPES", 10) == 0) ||
	    (len == 12 && memcmp(start, "VERSIONCHECK", 12) == 0) ||

 view all matches for this distribution


Etk-Perl

 view release on metacpan or  search on metacpan

xs/Alignment.xs  view on Meta::CPAN

void
etk_alignment_get(alignment)
	Etk_Alignment *	alignment
      ALIAS:
	Get=1
      PPCODE:
	float xalign;
	float yalign;
	float xscale;
	float yscale;

 view all matches for this distribution


Eval-Compile

 view release on metacpan or  search on metacpan

Compile.xs  view on Meta::CPAN


void 
cache_eval_undef()
    PREINIT:
    SV *last;
    PPCODE:
    last = eval_cache;
    if ( !eval_cache ){
	XSRETURN(0);
    };
    eval_cache=0;

Compile.xs  view on Meta::CPAN

    STRLEN plen;
    AV* temppad;
    HV* closure_cache;
    p_closure closure;
    dXSTARG;
    PPCODE:
    PERL_UNUSED_VAR(ix);
    if ( !eval_cache ){
	eval_cache = newAV();
	temppad = eval_cache;
	closure_cache = newHV();

Compile.xs  view on Meta::CPAN

    //I32 i;
    SV **value;
    char *pstr;
    STRLEN plen;
    dXSTARG;
    PPCODE:
    if ( ! (PL_op->op_private & OPpENTERSUB_HASTARG )){
	croak( "panic: XS sub no target " );
    };
    if (SvTYPE(TARG) != SVt_PVHV ){
	(void)SvUPGRADE( TARG , SVt_PVHV );

Compile.xs  view on Meta::CPAN


void run_sub( SV * code )
    PREINIT:
    I32 ret_count;
    int i;
    PPCODE:
    dSP;
    PUSHMARK(SP);
    PUTBACK;
    ret_count = call_sv( code, G_NOARGS | G_SCALAR );
    SPAGAIN;

Compile.xs  view on Meta::CPAN

void
compile_sub( SV *codetext)
    PREINIT:
    SV *text;
    SV *anonsub;
    PPCODE:
    //dSP;
    text= sv_newmortal( );
    sv_setpv( text , "sub {\n" );
    sv_catsv( text,  codetext );
    sv_catpv( text, "\n};\n" );

Compile.xs  view on Meta::CPAN

    long subcv_depth;
    long stack_depth;
    bool context_match;
    U32  context_seq;
    AV *results;
    PPCODE:
    if (cv && CvPADLIST( cv ) ){
	PADLIST *padlist = CvPADLIST( cv );
	if (CvDEPTH(cv)){
	    croak( "Fail compile: cv is running" );
	}

 view all matches for this distribution


Event-Lib

 view release on metacpan or  search on metacpan

const-xs.inc  view on Meta::CPAN

	/* NV		nv;	Uncomment this if you need to return NVs */
	/* const char	*pv;	Uncomment this if you need to return PVs */
    INPUT:
	SV *		sv;
        const char *	s = SvPV(sv, len);
    PPCODE:
        /* Change this to constant(aTHX_ s, len, &iv, &nv);
           if you need to return both NVs and IVs */
	type = constant(aTHX_ s, len, &iv);
      /* Return 1 or 2 items. First is error message, or undef if no error.
           Second, if present, is found value */

 view all matches for this distribution


Event-Stats

 view release on metacpan or  search on metacpan

lib/Event/Stats.xs  view on Meta::CPAN

	GEventAPI->install_stats(&Myvtbl);
     }

void
_enforcing_max_callback_time()
     PPCODE:
{
    XPUSHs(boolSV(EnforceMaxCBTime));
}

void
_enforce_max_callback_time(yes)
	bool yes
	PPCODE:
{
    XPUSHs(boolSV(EnforceMaxCBTime));
    if (!EnforceMaxCBTime ^ !yes)
	use_stats(yes? 1:-1);
    EnforceMaxCBTime = yes;

lib/Event/Stats.xs  view on Meta::CPAN

idle_time(sec)
	int sec
	PREINIT:
	int ran, die;
	double elapse;
	PPCODE:
	if (!Stats) croak("Event::Stats are not enabled");
	pe_stat_query(&idleStats, sec, &ran, &die, &elapse);
	XPUSHs(sv_2mortal(newSViv(ran)));
	XPUSHs(sv_2mortal(newSViv(die)));
	XPUSHs(sv_2mortal(newSVnv(elapse)));

lib/Event/Stats.xs  view on Meta::CPAN

total_time(sec)
	int sec
	PREINIT:
	int ran,die;
	double elapse;
	PPCODE:
	if (!Stats) croak("Event::Stats are not enabled");
	pe_stat_query(&totalStats, sec, &ran, &die, &elapse);
	XPUSHs(sv_2mortal(newSVnv(elapse)));

int

lib/Event/Stats.xs  view on Meta::CPAN

	int sec
	PREINIT:
	int ran, die;
	double elapse;
	pe_watcher *THIS;
	PPCODE:
	if (!Stats)
		croak("Event::Stats are not enabled");
	THIS = (pe_watcher*) GEventAPI->sv_2watcher(obj);
	if (THIS->stats)
	  pe_stat_query(THIS->stats, sec, &ran, &die, &elapse);

 view all matches for this distribution


Event

 view release on metacpan or  search on metacpan

Event.xs  view on Meta::CPAN

	OUTPUT:
	RETVAL

void
_memory_counters()
     PPCODE:
{
#ifdef EVENT_MEMORY_DEBUG
    int xx;
    for (xx=0; xx < MAX_MEMORYCOUNT; xx++)
	XPUSHs(sv_2mortal(newSViv(MemoryCount[xx])));
#endif
}

void
_incr_looplevel()
     PPCODE:
     ++LoopLevel;
     ++ExitLevel;

void
_decr_looplevel()
     PPCODE:
     --LoopLevel;

void
unloop(...)
     CODE:

Event.xs  view on Meta::CPAN

	int sec

void
all_watchers()
	PROTOTYPE:
	PPCODE:
	pe_watcher *ev;
	if (!AllWatchers.next)
	  return;
	ev = (pe_watcher*) AllWatchers.next->self;
	while (ev) {

Event.xs  view on Meta::CPAN

	}

void
all_idle()
	PROTOTYPE:
	PPCODE:
	pe_watcher *ev;
	if (!Idle.prev)
	  return;
	ev = (pe_watcher*) Idle.prev->self;
	while (ev) {

Event.xs  view on Meta::CPAN

	}

void
all_running()
	PROTOTYPE:
	PPCODE:
	int fx;
	for (fx = CurCBFrame; fx >= 0; fx--) {
	  pe_watcher *ev = (CBFrame + fx)->ev->up; /* XXX */
	  XPUSHs(watcher_2sv(ev));
	  if (GIMME_V != G_ARRAY)

Event.xs  view on Meta::CPAN

queue(...)
	PROTOTYPE: $;$
	PREINIT:
	pe_watcher *wa;
	pe_event *ev;
	PPCODE:
	wa = (pe_watcher*) sv_2watcher(ST(0));
	if (items == 1) {
	    ev = (*wa->vtbl->new_event)(wa);
	    ++ev->hits;
	}

Event.xs  view on Meta::CPAN

	LEAVE; /* reentry */

void
queue_time(prio)
	int prio
	PPCODE:
	NV max=0;
	int xx;
	if (prio < 0 || prio >= PE_QUEUES)
	  croak("queue_time(%d) out of domain [0..%d]",
		prio, PE_QUEUES-1);

Event.xs  view on Meta::CPAN


MODULE = Event		PACKAGE = Event::Event::Io

void
pe_event::got()
	PPCODE:
	XPUSHs(sv_2mortal(events_mask_2sv(((pe_ioevent*)THIS)->got)));

MODULE = Event		PACKAGE = Event::Event::Dataful

void
pe_event::data()
	PPCODE:
	XPUSHs(((pe_datafulevent*)THIS)->data);

MODULE = Event		PACKAGE = Event::Event

void

Event.xs  view on Meta::CPAN

	(*THIS->vtbl->dtor)(THIS);
}

void
pe_event::mom()
	PPCODE:
	if (--WarnCounter >= 0) warn("'mom' renamed to 'w'");
	XPUSHs(watcher_2sv(THIS->up));

void
pe_event::w()
	PPCODE:
	XPUSHs(watcher_2sv(THIS->up));

void
pe_event::hits()
	PPCODE:
	XPUSHs(sv_2mortal(newSViv(THIS->hits)));

void
pe_event::prio()
	PPCODE:
	XPUSHs(sv_2mortal(newSViv(THIS->prio)));

MODULE = Event		PACKAGE = Event::Watcher

void

Event.xs  view on Meta::CPAN

	}
}

void
pe_watcher::pending()
	PPCODE:
{
    if (GIMME_V == G_ARRAY) {
	pe_event *ev = (pe_event *) THIS->events.prev->self;
	while (ev) {
	    XPUSHs(event_2sv(ev));

Event.xs  view on Meta::CPAN

	pe_watcher_now(THIS);

void
pe_watcher::use_keys(...)
	PREINIT:
	PPCODE:
	warn("use_keys is deprecated");

void
pe_watcher::is_running(...)
	PPCODE:
	XPUSHs(sv_2mortal(newSViv(THIS->running)));

void
pe_watcher::is_active(...)
	PPCODE:
	PUTBACK;
	XPUSHs(boolSV(WaACTIVE(THIS)));

void
pe_watcher::is_suspended(...)
	PPCODE:
	PUTBACK;
	XPUSHs(boolSV(WaSUSPEND(THIS)));

void
pe_watcher::is_cancelled(...)
	PPCODE:
	PUTBACK;
	XPUSHs(boolSV(WaCANCELLED(THIS)));

void
pe_watcher::cb(...)
	PPCODE:
	PUTBACK;
	_watcher_callback(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

void
pe_watcher::cbtime(...)
	PPCODE:
	PUTBACK;
	_watcher_cbtime(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

void
pe_watcher::desc(...)
	PPCODE:
	PUTBACK;
	_watcher_desc(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

void
pe_watcher::debug(...)
	PPCODE:
	PUTBACK;
	_watcher_debug(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

void
pe_watcher::prio(...)
	PPCODE:
	PUTBACK;
	_watcher_priority(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

void
pe_watcher::reentrant(...)
	PPCODE:
	PUTBACK;
	_watcher_reentrant(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

void
pe_watcher::repeat(...)
	PPCODE:
	PUTBACK;
	_watcher_repeat(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

void
pe_watcher::max_cb_tm(...)
	PPCODE:
	PUTBACK;
	_watcher_max_cb_tm(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

MODULE = Event		PACKAGE = Event::Watcher::Tied

void
allocate(clname, temple)
	SV *clname
	SV *temple
	PPCODE:
	if (!SvROK(temple)) croak("Bad template");
	XPUSHs(watcher_2sv(pe_tied_allocate(gv_stashsv(clname, 1),
					    SvRV(temple))));

void
pe_watcher::hard(...)
	PPCODE:
	PUTBACK;
	_timeable_hard(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

void
pe_watcher::at(...)
	PPCODE:
	PUTBACK;
	_tied_at(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

void
pe_watcher::flags(...)
	PPCODE:
	PUTBACK;
	_tied_flags(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

MODULE = Event		PACKAGE = Event::idle

void
allocate(clname, temple)
	SV *clname;
	SV *temple;
	PPCODE:
	if (!SvROK(temple)) croak("Bad template");
	XPUSHs(watcher_2sv(pe_idle_allocate(gv_stashsv(clname, 1),
			SvRV(temple))));

void
pe_watcher::hard(...)
	PPCODE:
	PUTBACK;
	_timeable_hard(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

void
pe_watcher::max(...)
	PPCODE:
	PUTBACK;
	_idle_max_interval(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

void
pe_watcher::min(...)
	PPCODE:
	PUTBACK;
	_idle_min_interval(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

MODULE = Event		PACKAGE = Event::timer

void
allocate(clname, temple)
	SV *clname;
	SV *temple;
	PPCODE:
	XPUSHs(watcher_2sv(pe_timer_allocate(gv_stashsv(clname, 1),
			SvRV(temple))));

void
pe_watcher::at(...)
	PPCODE:
	PUTBACK;
	_timer_at(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

void
pe_watcher::hard(...)
	PPCODE:
	PUTBACK;
	_timeable_hard(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

void
pe_watcher::interval(...)
	PPCODE:
	PUTBACK;
	_timer_interval(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

MODULE = Event		PACKAGE = Event::io

void
allocate(clname, temple)
	SV *clname;
	SV *temple;
	PPCODE:
	if (!SvROK(temple)) croak("Bad template");
	XPUSHs(watcher_2sv(pe_io_allocate(gv_stashsv(clname, 1),
			SvRV(temple))));

void
pe_watcher::poll(...)
	PPCODE:
	PUTBACK;
	_io_poll(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

void
pe_watcher::fd(...)
	PPCODE:
	PUTBACK;
	_io_handle(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

void
pe_watcher::timeout(...)
	PPCODE:
	PUTBACK;
	_io_timeout(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

void
pe_watcher::timeout_cb(...)
	PPCODE:
	PUTBACK;
	_io_timeout_cb(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

MODULE = Event		PACKAGE = Event::var

void
allocate(clname, temple)
	SV *clname;
	SV *temple;
	PPCODE:
	XPUSHs(watcher_2sv(pe_var_allocate(gv_stashsv(clname, 1),
		SvRV(temple))));

void
pe_watcher::var(...)
	PPCODE:
	PUTBACK;
	_var_variable(THIS, items == 2? ST(1) : 0); /* don't mortalcopy!! */
	SPAGAIN;

void
pe_watcher::poll(...)
	PPCODE:
	PUTBACK;
	_var_events(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

MODULE = Event		PACKAGE = Event::signal

void
allocate(clname, temple)
	SV *clname;
	SV *temple;
	PPCODE:
	XPUSHs(watcher_2sv(pe_signal_allocate(gv_stashsv(clname, 1),
		SvRV(temple))));

void
pe_watcher::signal(...)
	PPCODE:
	PUTBACK;
	_signal_signal(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

MODULE = Event		PACKAGE = Event::group

void
allocate(clname, temple)
     SV *clname;
     SV *temple;
     PPCODE:
     XPUSHs(watcher_2sv(pe_group_allocate(gv_stashsv(clname, 1),
		SvRV(temple))));

void
pe_watcher::timeout(...)
	PPCODE:
	PUTBACK;
	_group_timeout(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

void
pe_watcher::add(...)
	PPCODE:
	PUTBACK;
	_group_add(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

void
pe_watcher::del(...)
	PPCODE:
	PUTBACK;
	_group_del(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

MODULE = Event		PACKAGE = Event::generic

void
allocate(clname, temple)
     SV *clname;
     SV *temple;
     PPCODE:
     XPUSHs(watcher_2sv(pe_generic_allocate(gv_stashsv(clname, 1),
		SvRV(temple))));

void
pe_watcher::source(...)
	PPCODE:
	PUTBACK;
	_generic_source(THIS, items == 2? sv_mortalcopy(ST(1)) : 0);
	SPAGAIN;

MODULE = Event		PACKAGE = Event::generic::Source

void
allocate(clname, temple)
	SV *clname;
	SV *temple;
	PPCODE:
	if (!SvROK(temple)) croak("Bad template");
	XPUSHs(genericsrc_2sv(pe_genericsrc_allocate(gv_stashsv(clname, 1),
			SvRV(temple))));

void

Event.xs  view on Meta::CPAN

	pe_genericsrc_dtor(sv_2genericsrc(ref));
}

void
pe_genericsrc::event(...)
	PPCODE:
	pe_genericsrc_event(THIS,
		items >= 2 ? sv_mortalcopy(ST(1)) : &PL_sv_undef);

 view all matches for this distribution


Evo

 view release on metacpan or  search on metacpan

lib/Evo/Class/Attrs/XS.xs  view on Meta::CPAN

  SV *self;
  SV *name;

void slots(self)
  SV *self;
PPCODE:
  AV *av = sv2av(self);
  int i, last = av_top_index(av), size = last + 1;

  for (i = 0; i < size; i++) {
    SV **tmp = av_fetch(av, i, 0);

 view all matches for this distribution


ExtUtils-Constant

 view release on metacpan or  search on metacpan

lib/ExtUtils/Constant.pm  view on Meta::CPAN

    INPUT:
	int		utf8 = SvUTF8(sv);
EOT
  }
  $xs .= << 'EOT';
    PPCODE:
EOT

  if ($params->{IV} xor $params->{NV}) {
    $xs .= << "EOT";
        /* Change this to $C_subname(aTHX_ s, len, &iv, &nv);

 view all matches for this distribution


ExtUtils-HasCompiler

 view release on metacpan or  search on metacpan

t/compare.t  view on Meta::CPAN

MODULE = EUHC::Test PACKAGE = EUHC::Test
PROTOTYPES: DISABLED

IV
compiled_xs()
	PPCODE:
	XSRETURN_IV(1);
END

my $test_file = <<'END';
use Test::More tests => 1;

 view all matches for this distribution


ExtUtils-ParseXS

 view release on metacpan or  search on metacpan

lib/ExtUtils/ParseXS/Constants.pm  view on Meta::CPAN

# IN_OUT, NO_INIT, NO_OUTPUT.
# This list is mainly used by the parser to delineate blocks (such as
# blocks of CODE or lines of INPUT).

our @XSKeywords      = qw( 
  REQUIRE BOOT CASE PREINIT INPUT INIT CODE PPCODE
  OUTPUT CLEANUP ALIAS ATTRS PROTOTYPES PROTOTYPE
  VERSIONCHECK INCLUDE INCLUDE_COMMAND SCOPE INTERFACE
  INTERFACE_MACRO C_ARGS POSTCALL OVERLOAD FALLBACK
  EXPORT_XSUB_SYMBOLS
);

 view all matches for this distribution


( run in 1.656 second using v1.01-cache-2.11-cpan-71847e10f99 )