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


HTML-Parser

 view release on metacpan or  search on metacpan

Parser.xs  view on Meta::CPAN

parse(self, chunk)
	SV* self;
	SV* chunk
    PREINIT:
	PSTATE* p_state = get_pstate_hv(aTHX_ self);
    PPCODE:
    (void)sv_2mortal(SvREFCNT_inc(SvRV(self)));
	if (p_state->parsing)
    	    croak("Parse loop not allowed");
        p_state->parsing = 1;
	if (SvROK(chunk) && SvTYPE(SvRV(chunk)) == SVt_PVCV) {

Parser.xs  view on Meta::CPAN

void
eof(self)
    SV* self;
    PREINIT:
    PSTATE* p_state = get_pstate_hv(aTHX_ self);
    PPCODE:
        if (p_state->parsing)
            p_state->eof = 1;
        else {
            p_state->parsing = 1;
            parse(aTHX_ p_state, 0, self); /* flush */

Parser.xs  view on Meta::CPAN

	STRLEN name_len;
	char *name = SvPV(eventname, name_len);
        int event = -1;
        int i;
        struct p_handler *h;
    PPCODE:
	/* map event name string to event_id */
	for (i = 0; i < EVENT_COUNT; i++) {
	    if (strEQ(name, event_id_str[i])) {
	        event = i;
	        break;

Parser.xs  view on Meta::CPAN

void
decode_entities(...)
    PREINIT:
        int i;
	HV *entity2char = get_hv("HTML::Entities::entity2char", 0);
    PPCODE:
	if (GIMME_V == G_SCALAR && items > 1)
            items = 1;
	for (i = 0; i < items; i++) {
	    if (GIMME_V != G_VOID)
	        ST(i) = sv_2mortal(newSVsv(ST(i)));

 view all matches for this distribution


HTML-T5

 view release on metacpan or  search on metacpan

T5.xs  view on Meta::CPAN

    PREINIT:
        TidyBuffer errbuf = {0};
        TidyDoc tdoc = tidyCreate(); /* Initialize "document" */
        const char* newline;
        int rc = 0;
    PPCODE:
        tidyBufInit(&errbuf);
        rc = ( tidyOptSetValue( tdoc, TidyCharEncoding, "utf8" ) ? rc : -1 );

        if ( (rc >= 0 ) && configfile && *configfile ) {
            rc = tidyLoadConfig( tdoc, configfile );

T5.xs  view on Meta::CPAN

        TidyBuffer errbuf = {0};
        TidyBuffer output = {0};
        TidyDoc tdoc = tidyCreate(); /* Initialize "document" */
        const char* newline;
        int rc = 0;
    PPCODE:
        tidyBufInit(&output);
        tidyBufInit(&errbuf);
        /* Set our default first. */
        /* Don't word-wrap */
        rc = ( tidyOptSetInt( tdoc, TidyWrapLen, 0 ) ? rc : -1 );

 view all matches for this distribution


HTML-TagReader

 view release on metacpan or  search on metacpan

TagReader.xs  view on Meta::CPAN

PREINIT:
	int bufpos;
	char ch;
	char chn;
	int state;
PPCODE:
        if (! self->fileline){
		croak("Object not initialized");
	}
	/* initialize */
	state=0;

TagReader.xs  view on Meta::CPAN

	char ch;
	char chn; /* next character */
	int typepos;
	int typeposdone;
	int state;
PPCODE:
        if (! self->fileline){
		croak("Object not initialized");
	}
	/* initialize */
	state=0;

 view all matches for this distribution


HTML-Tidy

 view release on metacpan or  search on metacpan

Tidy.xs  view on Meta::CPAN

    PREINIT:
        TidyBuffer errbuf = {0};
        TidyDoc tdoc = tidyCreate(); /* Initialize "document" */
        const char* newline;
        int rc = 0;
    PPCODE:
        tidyBufInit(&errbuf);
        rc = ( tidyOptSetValue( tdoc, TidyCharEncoding, "utf8" ) ? rc : -1 );

        if ( (rc >= 0 ) && configfile && *configfile ) {
            rc = tidyLoadConfig( tdoc, configfile );

Tidy.xs  view on Meta::CPAN

        TidyBuffer errbuf = {0};
        TidyBuffer output = {0};
        TidyDoc tdoc = tidyCreate(); /* Initialize "document" */
        const char* newline;
        int rc = 0;
    PPCODE:
        tidyBufInit(&output);
        tidyBufInit(&errbuf);
        /* Set our default first. */
        /* Don't word-wrap */
        rc = ( tidyOptSetInt( tdoc, TidyWrapLen, 0 ) ? rc : -1 );

 view all matches for this distribution


HTML-Tidy5

 view release on metacpan or  search on metacpan

Tidy5.xs  view on Meta::CPAN

    PREINIT:
        TidyBuffer errbuf = {0};
        TidyDoc tdoc = tidyCreate(); /* Initialize "document" */
        const char* newline;
        int rc = 0;
    PPCODE:
        tidyBufInit(&errbuf);
        rc = ( tidyOptSetValue( tdoc, TidyCharEncoding, "utf8" ) ? rc : -1 );

        if ( (rc >= 0 ) && configfile && *configfile ) {
            rc = tidyLoadConfig( tdoc, configfile );

Tidy5.xs  view on Meta::CPAN

        TidyBuffer errbuf = {0};
        TidyBuffer output = {0};
        TidyDoc tdoc = tidyCreate(); /* Initialize "document" */
        const char* newline;
        int rc = 0;
    PPCODE:
        tidyBufInit(&output);
        tidyBufInit(&errbuf);
        /* Set our default first. */
        /* Don't word-wrap */
        rc = ( tidyOptSetInt( tdoc, TidyWrapLen, 0 ) ? rc : -1 );

 view all matches for this distribution


HTML-Valid

 view release on metacpan or  search on metacpan

Valid.xs  view on Meta::CPAN

	HTML::Valid htv;
	SV * html;
PREINIT:
	SV * output;
	SV * errors;
PPCODE:
	html_valid_run (htv, html, & output, & errors);
	EXTEND (SP, 2);
	SvREFCNT_inc_simple_void_NN (output);
	PUSHs (sv_2mortal (output));
	SvREFCNT_inc_simple_void_NN (errors);

 view all matches for this distribution


HTTP-GHTTP

 view release on metacpan or  search on metacpan

GHTTP.xs  view on Meta::CPAN

        ghttp_request *self
    PREINIT:
        char **hdrs;
        int num_hdrs;
        int i;
    PPCODE:
        if (ghttp_get_header_names(self, &hdrs, &num_hdrs) == -1) {
            XSRETURN_UNDEF;
        }
        
        EXTEND(SP, num_hdrs);

GHTTP.xs  view on Meta::CPAN

get_status(self)
        ghttp_request *self
    PREINIT:
        int code;
        const char *reason;
    PPCODE:
        code = ghttp_status_code(self);
        reason = ghttp_reason_phrase(self);
        EXTEND(SP, 2);
        PUSHs(sv_2mortal(newSViv(code)));
       if (reason == NULL)

GHTTP.xs  view on Meta::CPAN

void
current_status(self)
        ghttp_request *self
    PREINIT:
        ghttp_current_status status;
    PPCODE:
        status = ghttp_get_status(self);
        EXTEND(SP, 3);
        PUSHs(sv_2mortal(newSViv(status.proc)));
        PUSHs(sv_2mortal(newSViv(status.bytes_read)));
        PUSHs(sv_2mortal(newSViv(status.bytes_total)));

 view all matches for this distribution


HTTP-HeaderParser-XS

 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


HTTP-Headers-Fast-XS

 view release on metacpan or  search on metacpan

XS.xs  view on Meta::CPAN

_header_get( SV *self, SV *field_name, ... )
    PREINIT:
        char   *field;
        STRLEN len;
        bool   skip_standardize;
    PPCODE:
        field = SvPV(field_name, len);
        skip_standardize = ( items == 3 ) && SvTRUE(ST(3));
        if (!skip_standardize)
            handle_standard_case(aTHX_ field, len);

XS.xs  view on Meta::CPAN

    PREINIT:
        char   *field;
        STRLEN len;
        bool   found;
        SV     **a_value;
    PPCODE:
        field = SvPV(field_name, len);

        handle_standard_case(aTHX_ field, len);

        /* we are putting the decremented(with the number of input parameters) SP back in the THX */

XS.xs  view on Meta::CPAN

void
_header_push(SV *self, SV *field_name, SV *val)
    PREINIT:
        char   *field;
        STRLEN len;
    PPCODE:
        field = SvPV(field_name, len);

        handle_standard_case(aTHX_ field, len);

        /* we are putting the decremented (with the number of

 view all matches for this distribution


HTTP-Parser-XS

 view release on metacpan or  search on metacpan

XS.xs  view on Meta::CPAN

OUTPUT:
  RETVAL

void
parse_http_response(SV* buf, int header_format, HV* special_headers = NULL)
PPCODE:
{
  int minor_version, status;
  const char* msg;
  size_t msg_len;
  struct phr_header headers[MAX_HEADERS];

 view all matches for this distribution


HTTP-Server-EV

 view release on metacpan or  search on metacpan

EV.xs  view on Meta::CPAN

#define URLDECODE_READ_SECOND_PART 4

void
url_decode( encoded )	
	SV* encoded
	PPCODE:
		SV* output = newSV( 100 );
		
		STRLEN len;
			
		char *input = SvPV(encoded, len);

 view all matches for this distribution


HTTP-XSHeaders

 view release on metacpan or  search on metacpan

XSHeaders.xs  view on Meta::CPAN

#
# Get all the keys in an existing HList.
#
void
header_field_names(HList* hl)
  PPCODE:
    GLOG(("=X= @@@ header_field_names(%p|%d), want %d",
          hl, hlist_size(hl), GIMME_V));
    hlist_sort(hl);
    PUTBACK;
    return_hlist(aTHX_ hl, "header_field_names", GIMME_V);

XSHeaders.xs  view on Meta::CPAN

    STRLEN len;
    char*  ckey = 0;
    HNode* n = 0;
    HList* seen = 0; /* TODO: make this more efficient; use Perl hash? */

  PPCODE:
    GLOG(("=X= @@@ header(%p|%d), %d params, want %d",
          hl, hlist_size(hl), argc, GIMME_V));

    argc = items - 1;
    do {

XSHeaders.xs  view on Meta::CPAN

    SV*    pkey = 0;
    STRLEN len;
    char*  ckey = 0;
    HNode* n = 0;

  PPCODE:
    GLOG(("=X= @@@ header(%p|%d), %d params, want %d",
          hl, hlist_size(hl), argc, GIMME_V));

    argc = items - 1;
    if (argc != 1) {

XSHeaders.xs  view on Meta::CPAN

    STRLEN len;
    char*  ckey;
    int    size = 0;
    int    total = 0;

  PPCODE:
    GLOG(("=X= @@@ remove_header(%p|%d), %d params, want %d",
          hl, hlist_size(hl), argc, GIMME_V));

    argc = items - 1;
    for (j = 1; j <= argc; ++j) {

 view all matches for this distribution


Haiku-SysInfo

 view release on metacpan or  search on metacpan

SysInfo.xs  view on Meta::CPAN


void
_sysinfo()
  PREINIT:
    system_info si;
  PPCODE:
    get_system_info(&si);
    EXTEND(SP, 15);
    PUSHs(sv_2mortal(newSViv(si.id[0])));
    PUSHs(sv_2mortal(newSViv(si.id[1])));
    PUSHs(sv_2mortal(newSVnv(si.boot_time)));

 view all matches for this distribution


Hash-BulkKeyCopy

 view release on metacpan or  search on metacpan

lib/Hash/BulkKeyCopy.xs  view on Meta::CPAN

PREINIT:
    int ht_kl,hs_kl,i;
    char *k1, *k2;
    SV **ptr1, **ptr2, **src_value;
    STRLEN k1size,k2size;
PPCODE:
    ht_kl = av_len(hash_target_keyarr) + 1;
    hs_kl = av_len(hash_src_keyarr) + 1;
    if (hs_kl == 0 || (ht_kl > 0 && hs_kl != ht_kl)) return;
    for(i=0;i<hs_kl;i++) {
        ptr1 = av_fetch(hash_target_keyarr, i, 0);

 view all matches for this distribution


Hash-GuavaRing

 view release on metacpan or  search on metacpan

GuavaRing.xs  view on Meta::CPAN

#define svstrcmp(a,b) strcmp(SvPV_nolen(a),b)

MODULE = Hash::GuavaRing		PACKAGE = Hash::GuavaRing

void new(...)
	PPCODE:
		if (items < 1) croak("Usage: %s->new(...)",SvPV_nolen(ST(0)));
		GuavaRing * self = (GuavaRing *) safemalloc( sizeof(GuavaRing) );
		if (unlikely(!self)) croak("Failed to allocate memory");
		memset(self,0,sizeof(GuavaRing));
		self->stash = gv_stashpv(SvPV_nolen(ST(0)), TRUE);

GuavaRing.xs  view on Meta::CPAN

		}

		XSRETURN(1);

void DESTROY(SV *)
	PPCODE:
		register GuavaRing *self = ( GuavaRing * ) SvUV( SvRV( ST(0) ) );
		if (self->nodes) SvREFCNT_dec(self->nodes);
		if (self->self && SvOK(self->self) && SvOK( SvRV(self->self) )) {
			SvREFCNT_inc(SvRV(self->self));
			SvREFCNT_dec(self->self);
		}
		safefree(self);
		XSRETURN_UNDEF;

void get (SV *, SV * key)
	PPCODE:
		register GuavaRing *self = ( GuavaRing * ) SvUV( SvRV( ST(0) ) );
		// fprintf(stderr,"\nav_len(self->nodes) = %i\n",av_len(self->nodes));
		int idx = guava( SvIV(key), av_len(self->nodes)+1 );

		SV **node = av_fetch(self->nodes, idx, 0);

 view all matches for this distribution


Hash-NoRef

 view release on metacpan or  search on metacpan

NoRef.xs  view on Meta::CPAN





# usage: SvREFCNT_inc(\$var) ;
#        PPCODE needed since otherwise sv_2mortal is inserted that will kill
#        the value.


SV *
SvREFCNT_inc(sv)
SV *	sv
 PPCODE:
	if ( SvROK(sv) ) {
	  sv = (SV*)SvRV(sv);
	  RETVAL = SvREFCNT_inc(sv) ;
      SvFLAGS(sv) |= SVf_BREAK ;
	  PUSHs(RETVAL);
    }


# usage: SvREFCNT_dec(\$var) ;
#        PPCODE needed since by default it is void

SV *
SvREFCNT_dec(sv)
SV *	sv
 PPCODE:
	if ( SvROK(sv) ) {
	  sv = (SV*)SvRV(sv);
	  SvREFCNT_dec(sv);
      SvFLAGS(sv) |= SVf_BREAK ;
	  PUSHs(sv);

 view all matches for this distribution


Hash-SharedMem

 view release on metacpan or  search on metacpan

lib/Hash/SharedMem.xs  view on Meta::CPAN

OUTPUT:
	RETVAL

void
CLEAR(SV *shash)
PPCODE:
	arg_check_shash(shash);
	croak("can't clear shared hash");

BOOT:
{

 view all matches for this distribution


Hash-Util-Pick

 view release on metacpan or  search on metacpan

lib/Hash/Util/Pick.xs  view on Meta::CPAN

PROTOTYPES: DISABLED

void
pick(...)
PROTOTYPE: $@
PPCODE:
{
    SV **args = &PL_stack_base[ax];
    HV *src = SvROK(args[0]) ?
        (HV*)SvRV(args[0]) : (HV*)sv_2mortal((SV*)newHV());

lib/Hash/Util/Pick.xs  view on Meta::CPAN

}

void
pick_by(...)
PROTOTYPE: $&
PPCODE:
{
    dMULTICALL;
    GV *gv;
    HV *stash;
    I32 gimme = G_SCALAR;

lib/Hash/Util/Pick.xs  view on Meta::CPAN

}

void
omit(...)
PROTOTYPE: $@
PPCODE:
{
    SV **args = &PL_stack_base[ax];
    HV *src = SvROK(args[0]) ?
        (HV*)SvRV(args[0]) : (HV*)sv_2mortal((SV*)newHV());

lib/Hash/Util/Pick.xs  view on Meta::CPAN

}

void
omit_by(...)
PROTOTYPE: $&
PPCODE:
{
    dMULTICALL;
    GV *gv;
    HV *stash;
    I32 gimme = G_SCALAR;

 view all matches for this distribution


Hash-Util-Set-XS

 view release on metacpan or  search on metacpan

XS.xs  view on Meta::CPAN

PROTOTYPE: \%\%
PREINIT:
  HV *seen;
  HE *he;
  SV *key;
PPCODE:
  if(GIMME_V != G_LIST)
    XSRETURN_IV(THX_keys_union_count(aTHX_ x, y));

  EXTEND(SP, (SSize_t)HvTOTALKEYS(x) + (SSize_t)HvTOTALKEYS(y));

XS.xs  view on Meta::CPAN

  HV *y
PROTOTYPE: \%\%
PREINIT:
  HE *he;
  SV *key;
PPCODE:
  if(GIMME_V != G_LIST)
    XSRETURN_IV(THX_keys_intersection_count(aTHX_ x, y));

  if (HvTOTALKEYS(x) > HvTOTALKEYS(y)) {
    HV *tmp = x;

XS.xs  view on Meta::CPAN

  HV *y
PROTOTYPE: \%\%
PREINIT:
  HE *he;
  SV *key;
PPCODE:
  if(GIMME_V != G_LIST)
    XSRETURN_IV(THX_keys_difference_count(aTHX_ x, y));

  EXTEND(SP, (SSize_t)HvTOTALKEYS(x));

XS.xs  view on Meta::CPAN

  HV *y
PROTOTYPE: \%\%
PREINIT:
  HE *he;
  SV *key;
PPCODE:
  if(GIMME_V != G_LIST)
    XSRETURN_IV(THX_keys_symmetric_difference_count(aTHX_ x, y));

  EXTEND(SP, (SSize_t)HvTOTALKEYS(x) + (SSize_t)HvTOTALKEYS(y));

XS.xs  view on Meta::CPAN

keys_any(x, ...)
  HV *x
PROTOTYPE: \%@
PREINIT:
  I32 i;
PPCODE:
  for (i = 1; i < items; i++) {
    if (hv_exists_ent(x, ST(i), 0))
      XSRETURN_YES;
  }
  XSRETURN_NO;

XS.xs  view on Meta::CPAN

keys_all(x, ...)
  HV *x
PROTOTYPE: \%@
PREINIT:
  I32 i;
PPCODE:
  for (i = 1; i < items; i++) {
    if (!hv_exists_ent(x, ST(i), 0))
      XSRETURN_NO;
  }
  XSRETURN_YES;

XS.xs  view on Meta::CPAN

keys_none(x, ...)
  HV *x
PROTOTYPE: \%@
PREINIT:
  I32 i;
PPCODE:
  for (i = 1; i < items; i++) {
    if (hv_exists_ent(x, ST(i), 0))
      XSRETURN_NO;
  }
  XSRETURN_YES;

XS.xs  view on Meta::CPAN

PROTOTYPE: \%\%
PREINIT:
  AV *only_x, *both, *only_y;
  HE *he;
  SV *key;
PPCODE:

  sv_2mortal((SV *)(only_x = newAV()));
  sv_2mortal((SV *)(both = newAV()));
  sv_2mortal((SV *)(only_y = newAV()));

 view all matches for this distribution


Heap-Fibonacci-Fast

 view release on metacpan or  search on metacpan

Fast.xs  view on Meta::CPAN


void
extract_upto(obj, upto_key)
		SV* obj
		SV* upto_key
	PPCODE:
		if(!SvOK(upto_key)){
			croak("Undef supplied as key for extract_upto()");
		}

		struct fibheap* heap = (struct fibheap*)SvIV(SvRV(obj));

Fast.xs  view on Meta::CPAN

		}

void
key_insert(obj, ...)
		SV* obj
	PPCODE:
		struct fibheap* heap;
		SV *ret, *elem;
		int key;
		I32 gimme;
		int i;

Fast.xs  view on Meta::CPAN

		}

void
insert(obj, ...)
		SV* obj
	PPCODE:
		struct fibheap* heap;
		SV *ret, *elem;
		I32 gimme;
		int i;

 view all matches for this distribution


Heap-Simple-XS

 view release on metacpan or  search on metacpan

XS.xs  view on Meta::CPAN

void
extract_top(heap h)
  ALIAS:
    Heap::Simple::XS::extract_min   = 1
    Heap::Simple::XS::extract_first = 2
  PPCODE:
    if (h->used <= 2) {
        if (h->used < 2) {
            if (ix != 2) croak("Empty heap");
            XSRETURN_EMPTY;
        }

XS.xs  view on Meta::CPAN

        PUSHs(sv_2mortal(extract_top(aTHX_ h)));
    }

void
extract_upto(heap h, SV *border)
  PPCODE:
    /* special case, avoid uneeded access to border */
    if (h->used < 2) return;
    if (h->locked) croak("recursive heap change");
    SAVEINT(h->locked);
    h->locked = 1;

XS.xs  view on Meta::CPAN

    }
    if ((h->used+4)*4 < h->allocated) extend(h, 0); /* shrink really */

void
extract_all(heap h)
  PPCODE:
    if (h->locked) croak("recursive heap change");
    SAVEINT(h->locked);
    h->locked = 1;
    /* Extends one too much. Who cares... */
    EXTEND(SP, h->used);

XS.xs  view on Meta::CPAN


void
top(heap h)
  ALIAS:
    Heap::Simple::XS::first = 1
  PPCODE:
    if (h->used < 2) {
        if (ix != 1) croak("Empty heap");
        XSRETURN_EMPTY;
    }
    if (h->has_values) PUSHs(sv_2mortal(SvREFCNT_inc(h->values[1])));

XS.xs  view on Meta::CPAN

void
top_key(heap h)
  ALIAS:
    Heap::Simple::XS::min_key   = 1
    Heap::Simple::XS::first_key = 2
  PPCODE:
    if (h->used < 2) {
        if (ix == 2) XSRETURN_EMPTY;
        if (!h->infinity || !SvOK(h->infinity)) croak("Empty heap");
        PUSHs(sv_2mortal(SvREFCNT_inc(h->infinity)));
    } else if (h->fast) {

XS.xs  view on Meta::CPAN

keys(heap h)
  PREINIT:
    /* you can actally modify the values through the return */
    size_t i;
    SV *key;
  PPCODE:
    /* Extends one too much. Who cares... */
    EXTEND(SP, h->used);
    EXTEND_MORTAL(h->used);
    if (h->fast) {
        if      (h->order == LESS) for (i=1; i<h->used; i++)

XS.xs  view on Meta::CPAN

void
values(heap h)
  PREINIT:
    /* you can actally modify the values through the return */
    size_t i;
  PPCODE:
    /* Extends one too much. Who cares... */
    EXTEND(SP, h->used);
    EXTEND_MORTAL(h->used);
    if (h->has_values) for (i=1; i<h->used; i++)
        PUSHs(sv_2mortal(SvREFCNT_inc(h->values[i])));

XS.xs  view on Meta::CPAN


void
clear(heap h)
  PREINIT:
    SV *key, *value;
  PPCODE:
    if (h->locked) croak("recursive heap change");
    SAVEINT(h->locked);
    h->locked = 1;
    if (h->fast || !h->wrapped) {
        if (h->has_values)

XS.xs  view on Meta::CPAN

_absorb(SV * heap1, SV *heap2)
  PREINIT:
    int copied2, one_by_one;
    SV *heap1_ref, *value;
    heap h1, h2;
  PPCODE:
    /* Helper for absorb, puts h1 into h2 */
    h1 = C_HEAP(heap1, "heap1");
    /* Keep argument alive for the duration */
    heap1_ref = SvRV(heap1);
    sv_2mortal(SvREFCNT_inc(heap1_ref));

XS.xs  view on Meta::CPAN

  PREINIT:
    int copied2;
    SV *heap1_ref, *key, *value;
    heap h1, h2;
    int one_by_one;
  PPCODE:
    /* Helper for absorb, puts h1 into h2 */
    h1 = C_HEAP(heap1, "heap1");
    /* Keep arguments alive for the duration */
    heap1_ref = SvRV(heap1);
    sv_2mortal(SvREFCNT_inc(heap1_ref));

XS.xs  view on Meta::CPAN

        }
    }

void
infinity(heap h, SV *new_infinity=0)
  PPCODE:
    if (GIMME_V != G_VOID)
        XPUSHs(h->infinity ?
               sv_2mortal(SvREFCNT_inc(h->infinity)) : &PL_sv_undef);
    if (new_infinity) {
        if (h->infinity) sv_2mortal(h->infinity);

XS.xs  view on Meta::CPAN

  OUTPUT:
    RETVAL

void
user_data(heap h, SV *new_user_data=0)
  PPCODE:
    if (GIMME_V != G_VOID)
        PUSHs(h->user_data ? h->user_data : &PL_sv_undef);
    if (new_user_data) {
        if (h->user_data) sv_2mortal(h->user_data);
        h->user_data = newSVsv(new_user_data);
    }

void
order(heap h)
  PPCODE:
    PUSHs(h->order == CODE_ORDER ?
          h->order_sv : sv_2mortal(newSVpv(order_name(h), 0)));

void
elements(heap h)
  PPCODE:
    XPUSHs(sv_2mortal(newSVpv(elements_name(h), 0)));
    if (GIMME_V == G_ARRAY) switch(h->elements) {
      case SCALAR:
        break;
      case ARRAY:

XS.xs  view on Meta::CPAN

        croak("Assertion: unhandled element type %s", elements_name(h));
    }

void
wrapped(heap h)
  PPCODE:
    if (h->key_ops) XSRETURN_YES;
    if (GIMME_V == G_SCALAR) XSRETURN_NO;
    XSRETURN_EMPTY;

void
dirty(heap h)
  PPCODE:
    if (h->dirty) XSRETURN_YES;
    if (GIMME_V == G_SCALAR) XSRETURN_NO;
    XSRETURN_EMPTY;

void
can_die(heap h)
  PPCODE:
    /* ->fast types are wrapped too really */
    if (h->can_die) XSRETURN_YES;
    if (GIMME_V == G_SCALAR) XSRETURN_NO;
    XSRETURN_EMPTY;

void
max_count(heap h)
  PPCODE:
    if (h->max_count == MAX_SIZE) XSRETURN_NV(INFINITY);
    XSRETURN_UV(h->max_count);

void
merge_arrays(heap h, ...)

XS.xs  view on Meta::CPAN


void
DESTROY(heap h)
  PREINIT:
    SV *key, *value;
  PPCODE:
    /* Let's assume the module isn't buggy and it always increases the refcount
       on the heap during modification.
       That means that the user is explicitely calling DESTROY */
    if (h->locked)
	croak("Refusing explicit DESTROY call during heap modification");

 view all matches for this distribution


Heimdal-Kadm5

 view release on metacpan or  search on metacpan

Kadm5.xs  view on Meta::CPAN


void
kadm5_c_get_principals(handle,exp)
     shandle_t *handle
     char      *exp
     PPCODE:
     {
       char **princs;
       int num_princs,i;
       kadm5_ret_t ret;

Kadm5.xs  view on Meta::CPAN

     }

int
getPrincExpireTime(spp)
     sprincipal_t *spp
     PPCODE:
     {
       XPUSHi(spp->principal.princ_expire_time);
     }

void

 view all matches for this distribution


HiPi-BCM2835

 view release on metacpan or  search on metacpan

BCM2835.xs  view on Meta::CPAN

bcm2835_spi_transfer(uint8_t value)

void
hipi_spi_transfern( tbuf )
    SV* tbuf
  PPCODE:
    SV* rbuf = newSVsv(tbuf);
    bcm2835_spi_transfern( SvPVX(rbuf), (uint32_t)SvCUR(rbuf) );
    
    EXTEND(SP, 1);
    PUSHs(sv_2mortal(rbuf));

BCM2835.xs  view on Meta::CPAN

bcm2835_spi_transfern(char* buf, short length(buf))

void
hipi_spi_transfernb( tbuf )
    SV* tbuf
  PPCODE:
    SV* rbuf = newSVsv(tbuf);
    bcm2835_spi_transfernb( SvPVX(tbuf), SvPVX(rbuf), (uint32_t)SvCUR(tbuf) );
    
    EXTEND(SP, 1);
    PUSHs(sv_2mortal(rbuf));

BCM2835.xs  view on Meta::CPAN

bcm2835_spi_transfernb(char* tbuf, char* rbuf, short length(tbuf))

void
hipi_spi_writenb( buf )
    SV* buf
  PPCODE:
    SV* rbuf = sv_2mortal(newSVsv(buf));
    bcm2835_spi_writenb( SvPVX(rbuf), (uint32_t)SvCUR(rbuf) );
    
    EXTEND(SP, 1);
    PUSHs(rbuf);

 view all matches for this distribution


HiPi

 view release on metacpan or  search on metacpan

Exec.xs  view on Meta::CPAN


PROTOTYPES:  DISABLE

void
_compress_buffer(SV* inputsv)
  PPCODE:
    unsigned char* outputbuffer;
    SV* output = sv_newmortal();
    unsigned inputsize = SvCUR(inputsv);
    unsigned char* inputbuffer = (unsigned char *)SvPVX(inputsv);
    unsigned outputsize = inputsize + (inputsize * 0.1) + 12;

Exec.xs  view on Meta::CPAN

    PUSHs(sv_2mortal(newSViv(compressedsize)));
  

void
_decompress_buffer(SV* inputsv, unsigned outputsize)
  PPCODE:
    unsigned char* outputbuffer;
    SV* output = sv_newmortal();
    unsigned inputsize = SvCUR(inputsv);
    unsigned char* inputbuffer = (unsigned char *)SvPVX(inputsv);
    

 view all matches for this distribution


Hiredis-Raw

 view release on metacpan or  search on metacpan

hiredis.xs  view on Meta::CPAN

MODULE = Hiredis::Raw	PACKAGE = Hiredis::Raw   PREFIX = redis
PROTOTYPES: DISABLE

void
redisVersion()
    PPCODE:
        EXTEND(SP, 3);
        PUSHs(sv_2mortal(newSViv(HIREDIS_MAJOR)));
        PUSHs(sv_2mortal(newSViv(HIREDIS_MINOR)));
        PUSHs(sv_2mortal(newSViv(HIREDIS_PATCH)));

hiredis.xs  view on Meta::CPAN

void
redisAsyncFree(redisAsyncContext *ac)

void
redisAsyncIsAllocated(SV *self)
    PPCODE:
        void *ac = xs_object_magic_get_struct(aTHX_ SvRV(self));
        EXTEND(SP, 1);
        if (ac == NULL)
            PUSHs(&PL_sv_no);
        else

hiredis.xs  view on Meta::CPAN

void
redisAsyncDisconnect(redisAsyncContext *ac)

void
redisAsyncGetFd(redisAsyncContext *ac)
    PPCODE:
        EXTEND(SP, 1);
        PUSHs(sv_2mortal(newSViv(ac->c.fd)));

 view all matches for this distribution


Hobocamp

 view release on metacpan or  search on metacpan

Dialog.xs  view on Meta::CPAN

        int current_item = 0;
        DIALOG_LISTITEM *listitems;
        int dialog_return_code;
    INIT:
        items_amount = av_len((AV *)SvRV(items_list)) + 1;
    PPCODE:
        listitems = dlg_calloc(DIALOG_LISTITEM, (size_t) items_amount);

        for (i = 0; i < items_amount; i++) {
            listitems[i].name = SvPV_nolen(_get_hash_key_sv_from_array(items_list, i, "name"));
            listitems[i].text = SvPV_nolen(_get_hash_key_sv_from_array(items_list, i, "text"));

Dialog.xs  view on Meta::CPAN

        int current_item = 0;
        DIALOG_LISTITEM *listitems;
        int dialog_return_code;
    INIT:
        items_amount = av_len((AV *)SvRV(items_menu)) + 1;
    PPCODE:
        listitems = dlg_calloc(DIALOG_LISTITEM, (size_t) items_amount);

        for (i = 0; i < items_amount; i++) {
            listitems[i].name = SvPV_nolen(_get_hash_key_sv_from_array(items_menu, i, "name"));
            listitems[i].text = SvPV_nolen(_get_hash_key_sv_from_array(items_menu, i, "text"));

Dialog.xs  view on Meta::CPAN

# -------- extra --------

void
_dialog_result()
    PROTOTYPE:
    PPCODE:
        mXPUSHs(newSVpv(dialog_vars.input_result, 0));
        dlg_clr_result();

void
_dialog_set_backtitle(title)

 view all matches for this distribution


Hook-Scope

 view release on metacpan or  search on metacpan

Scope.xs  view on Meta::CPAN

PROTOTYPES: ENABLE

void
POST(SV* hook)
PROTOTYPE: &
PPCODE:
{
  LEAVE;
  SAVEDESTRUCTOR_X(exec_leave,newSVsv(hook));
  ENTER;
}

 view all matches for this distribution


Horus

 view release on metacpan or  search on metacpan

Horus.xs  view on Meta::CPAN


void
uuid_v4_bulk(count, fmt = HORUS_FMT_STR)
        int count
        int fmt
    PPCODE:
    {
        int i;
        if (count <= 0)
            XSRETURN_EMPTY;

Horus.xs  view on Meta::CPAN


void
bulk(self, count)
        SV *self
        int count
    PPCODE:
    {
        dMY_CXT;
        HV *hv;
        SV **svp;
        int fmt, ver, i;

 view all matches for this distribution


Hyperman

 view release on metacpan or  search on metacpan

xs/future.xs  view on Meta::CPAN

void
get(self)
    SV *self
    ALIAS:
        result = 1
    PPCODE:
    {
        IV st;
        PERL_UNUSED_VAR(ix);
        hmf_await(aTHX_ self);
        st = hmf_state(aTHX_ self);

xs/future.xs  view on Meta::CPAN

    }

void
failure(self)
    SV *self
    PPCODE:
    {
        hmf_await(aTHX_ self);
        if (hmf_state(aTHX_ self) != HMF_FAILED) XSRETURN_EMPTY;
        {
            AV *fav = hmf_values_av(aTHX_ self);

xs/future.xs  view on Meta::CPAN


# result/failure values as a plain list, no dying, no awaiting.
void
_values(self)
    SV *self
    PPCODE:
    {
        AV *rav = hmf_values_av(aTHX_ self);
        SSize_t i, n = rav ? av_len(rav) + 1 : 0;
        EXTEND(SP, n);
        for (i = 0; i < n; i++) {

 view all matches for this distribution


IBM-LoadLeveler

 view release on metacpan or  search on metacpan

DataAccess.xsh  view on Meta::CPAN

ll_get_data(object,Specification)
	LL_element *object
	int Specification       
	PROTOTYPE: $$

	PPCODE:
	{
		RETVAL=(void *)targ; /* bogus but spresses any unused variable error messages */
	    /*fprintf(stderr,"\nSPECIFICATION = %d\n",Specification);*/
	    switch (defs[Specification])
	    {

 view all matches for this distribution


( run in 3.031 seconds using v1.01-cache-2.11-cpan-92ad3014f07 )