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


Solaris-NDDI

 view release on metacpan or  search on metacpan

NDDI.xs  view on Meta::CPAN

FIRSTKEY(self)
   SV *self;
PREINIT:
   HV *hash;
   HE *he;
PPCODE:
   hash = (HV*)SvRV(self);
   hv_iterinit(hash);
   if (he = hv_iternext(hash)) {
      EXTEND(sp, 1);
      PUSHs(hv_iterkeysv(he));

NDDI.xs  view on Meta::CPAN

   SV *self;
   SV *lastkey;
PREINIT:
   HV *hash;
   HE *he;
PPCODE:
   hash = (HV*)SvRV(self);
   if (he = hv_iternext(hash)) {
      EXTEND(sp, 1);
      PUSHs(hv_iterkeysv(he));
   }

 view all matches for this distribution


Solaris-loadavg

 view release on metacpan or  search on metacpan

loadavg.xs  view on Meta::CPAN

loadavg(nelem=LOADAVG_NSTATS)
   int nelem;
PREINIT:
   double *loadavg;
   int     rc, i;
PPCODE:
   if (nelem > 3 || nelem < 1)
      croak("invalid nelem (%d)", nelem);
   New(0, loadavg, sizeof(double)*nelem, double);
   if ((rc = getloadavg(loadavg, nelem)) != nelem)
      croak("getloadavg failed (%d)", rc);

 view all matches for this distribution


Sort-DJB

 view release on metacpan or  search on metacpan

DJB.xs  view on Meta::CPAN

        RETVAL

void
sort_int32(av_ref)
        SV *av_ref
    PPCODE:
        SORT_BODY("sort_int32", av_ref, int32_t, djbsort_int32, av_to_int32, int32_to_av)

void
sort_int32down(av_ref)
        SV *av_ref
    PPCODE:
        SORT_BODY("sort_int32down", av_ref, int32_t, djbsort_int32down, av_to_int32, int32_to_av)

void
sort_uint32(av_ref)
        SV *av_ref
    PPCODE:
        SORT_BODY("sort_uint32", av_ref, uint32_t, djbsort_uint32, av_to_uint32, uint32_to_av)

void
sort_uint32down(av_ref)
        SV *av_ref
    PPCODE:
        SORT_BODY("sort_uint32down", av_ref, uint32_t, djbsort_uint32down, av_to_uint32, uint32_to_av)

void
sort_int64(av_ref)
        SV *av_ref
    PPCODE:
        SORT_BODY("sort_int64", av_ref, int64_t, djbsort_int64, av_to_int64, int64_to_av)

void
sort_int64down(av_ref)
        SV *av_ref
    PPCODE:
        SORT_BODY("sort_int64down", av_ref, int64_t, djbsort_int64down, av_to_int64, int64_to_av)

void
sort_uint64(av_ref)
        SV *av_ref
    PPCODE:
        SORT_BODY("sort_uint64", av_ref, uint64_t, djbsort_uint64, av_to_uint64, uint64_to_av)

void
sort_uint64down(av_ref)
        SV *av_ref
    PPCODE:
        SORT_BODY("sort_uint64down", av_ref, uint64_t, djbsort_uint64down, av_to_uint64, uint64_to_av)

void
sort_float32(av_ref)
        SV *av_ref
    PPCODE:
        SORT_BODY("sort_float32", av_ref, float, djbsort_float32, av_to_float32, float32_to_av)

void
sort_float32down(av_ref)
        SV *av_ref
    PPCODE:
        SORT_BODY("sort_float32down", av_ref, float, djbsort_float32down, av_to_float32, float32_to_av)

void
sort_float64(av_ref)
        SV *av_ref
    PPCODE:
        SORT_BODY("sort_float64", av_ref, double, djbsort_float64, av_to_float64, float64_to_av)

void
sort_float64down(av_ref)
        SV *av_ref
    PPCODE:
        SORT_BODY("sort_float64down", av_ref, double, djbsort_float64down, av_to_float64, float64_to_av)

 view all matches for this distribution


Sort-External

 view release on metacpan or  search on metacpan

External.xs  view on Meta::CPAN

OUTPUT: RETVAL

void
DESTROY(self)
    SortExternal *self;
PPCODE:
    SortEx_destroy(self);

void
feed(self, ...)
    SortExternal *self;
PPCODE:
{
    AV *const item_cache = self->item_cache;
    I32 start    = av_len(item_cache) + 1;
    I32 new_size = start + items - 1;
    IV  space    = (OVERHEAD + sizeof(SV*)) * (items - 1);

External.xs  view on Meta::CPAN

}

void
fetch(self)
    SortExternal *self;
PPCODE:
{
    if (self->fetch_tick > av_len(self->item_cache)) {
        ENTER;
        SAVETMPS;
        PUSHMARK(SP);

External.xs  view on Meta::CPAN

    
void
_set_mem_bytes(self, mem_bytes)
    SortExternal *self;
    IV mem_bytes;
PPCODE:
    self->mem_bytes = mem_bytes;

void
_set_fetch_tick(self, fetch_tick)
    SortExternal *self;
    IV fetch_tick;
PPCODE:
    self->fetch_tick = fetch_tick;

void
_set_temp_fh(self, tempfile_fh)
    SortExternal *self;
    SV *tempfile_fh;
PPCODE:
    SvREFCNT_dec(self->tempfile_fh);
    self->tempfile_fh   = newSVsv(tempfile_fh);
    self->fh            = IoIFP( sv_2io(tempfile_fh) );

void
_print_to_sortfile(self, input_av, fh)
    SortExternal *self;
    AV *input_av;
    PerlIO *fh;
PPCODE:
    SortEx_print_to_sortfile(self, input_av, fh);

void
_utf8_on(sv)
    SV *sv;
PPCODE:
    /* Testing only. */
    SvUTF8_on(sv);

MODULE = Sort::External   PACKAGE = Sort::External::SortExRun

External.xs  view on Meta::CPAN

OUTPUT: RETVAL

void
DESTROY(self)
    SortExRun *self;
PPCODE:
    SortExRun_destroy(self);

SV*
_get_buffarray(self)
    SortExRun *self;

External.xs  view on Meta::CPAN


void
_set_buffarray(self, buffarray);
    SortExRun *self;
    AV *buffarray;
PPCODE:
    SvREFCNT_dec((SV*)self->buffarray);
    self->buffarray = (AV*)SvREFCNT_inc((SV*)buffarray);

IV
_refill_buffer(self)

 view all matches for this distribution


Sort-Key-Domain

 view release on metacpan or  search on metacpan

Domain.xs  view on Meta::CPAN

PROTOTYPES: DISABLE

void
mkkey_domain(domain = NULL)
    SV *domain
PPCODE:
    if (!domain)
        domain = DEFSV;
    EXTEND(SP, 1);
    ST(0) = mkkey_domain(aTHX_ domain);
    XSRETURN(1);

 view all matches for this distribution


Sort-Key-IPv4

 view release on metacpan or  search on metacpan

IPv4.xs  view on Meta::CPAN

pack_netipv4(netipv4=NULL)
    SV *netipv4
PREINIT:
    UV ip;
    const char *p;
PPCODE:
    if (!netipv4)
        netipv4 = DEFSV;
    if (parse_ip(aTHX_ SvPV_nolen(netipv4), '/', &ip, &p)) {
        int len;
        if (parse_len(aTHX_ p, &len)) {

 view all matches for this distribution


Sort-Key-LargeInt

 view release on metacpan or  search on metacpan

LargeInt.xs  view on Meta::CPAN

MODULE = Sort::Key::LargeInt		PACKAGE = Sort::Key::LargeInt		

void
encode_largeint(li=NULL)
    SV *li
PPCODE:
    if (!li) 
        li = DEFSV;
    {
	STRLEN len;
	const char *li_pv = SvPV(li, len);

 view all matches for this distribution


Sort-Key-Merger

 view release on metacpan or  search on metacpan

Merger.xs  view on Meta::CPAN

PREINIT:
    I32 (*cmp)(pTHX_ SV *, SV *);
    int min, max, pv;
    SV **srci, **src0j, *k0, *i0;
    SV *src0;
PPCODE:
    switch (type) {
    case 0:
        cmp=&Perl_sv_cmp;
        break;
    case 1:

 view all matches for this distribution


Sort-Key-OID

 view release on metacpan or  search on metacpan

OID.xs  view on Meta::CPAN

PROTOTYPES: DISABLE
    
void
encode_oid(oid=NULL)
    SV *oid
PPCODE:
    if (!oid)
        oid = DEFSV;
    {
        STRLEN len;
        const char * str = SvPV(oid, len);

 view all matches for this distribution


Sort-Key-Radix

 view release on metacpan or  search on metacpan

Radix.xs  view on Meta::CPAN

    rnsort = 130
    risort = 131
    rusort = 132
    rfsort = 133
    rssort = 135
PPCODE:
    radix_sort(aTHX_ ix, 0, 0, 0, ax, items);
    SPAGAIN;
    XSRETURN(items);

void

Radix.xs  view on Meta::CPAN

    rnkeysort = 130
    rikeysort = 131
    rukeysort = 132
    rfkeysort = 133
    rskeysort = 135
PPCODE:
    radix_sort(aTHX_ ix, keygen, 0, 1, ax, items - 1);
    SPAGAIN;
    XSRETURN(items - 1);


 view all matches for this distribution


Sort-Key-Top

 view release on metacpan or  search on metacpan

Top.xs  view on Meta::CPAN

        rkeytop = 128
        rlkeytop = 129
        rnkeytop = 130
        rikeytop = 131
        rukeytop = 132
PPCODE:
        check_keygen(aTHX_ keygen);
        XSRETURN(_keytop(aTHX_ ix, keygen, top, 0, 2, items-2, ax, (GIMME_V == G_ARRAY)));

void
top(IV top, ...)

Top.xs  view on Meta::CPAN

        rtop = 128
        rltop = 129
        rntop = 130
        ritop = 131
        rutop = 132
PPCODE:
        XSRETURN(_keytop(aTHX_ ix, 0, top, 0, MODE_SORT, items-1, ax, (GIMME_V == G_ARRAY)));

void
keypart(SV *keygen, IV top, ...)
PROTOTYPE: &@

Top.xs  view on Meta::CPAN

        rkeypart = 128
        rlkeypart = 129
        rnkeypart = 130
        rikeypart = 131
        rukeypart = 132
PPCODE:
        check_keygen(aTHX_ keygen);
        XSRETURN(_keytop(aTHX_ ix, keygen, top, MODE_PART, 2, items-2, ax, (GIMME_V == G_ARRAY)));

void
part(IV top, ...)

Top.xs  view on Meta::CPAN

        rpart = 128
        rlpart = 129
        rnpart = 130
        ripart = 131
        rupart = 132
PPCODE:
        XSRETURN(_keytop(aTHX_ ix, 0, top, MODE_PART, 1, items-1, ax, (GIMME_V == G_ARRAY)));

void
keypartref(SV *keygen, IV top, ...)
PROTOTYPE: &@

Top.xs  view on Meta::CPAN

        rkeypartref = 128
        rlkeypartref = 129
        rnkeypartref = 130
        rikeypartref = 131
        rukeypartref = 132
PPCODE:
        check_keygen(aTHX_ keygen);
        XSRETURN(_keytop(aTHX_ ix, keygen, top, MODE_PARTREF, 2, items-2, ax, (GIMME_V == G_ARRAY)));

void
partref(IV top, ...)

Top.xs  view on Meta::CPAN

        rpartref = 128
        rlpartref = 129
        rnpartref = 130
        ripartref = 131
        rupartref = 132
PPCODE:
        XSRETURN(_keytop(aTHX_ ix, 0, top, MODE_PARTREF, 1, items-1, ax, (GIMME_V == G_ARRAY)));

void
keytopsort(SV *keygen, IV top, ...)
PROTOTYPE: &@

Top.xs  view on Meta::CPAN

        rkeytopsort = 128
        rlkeytopsort = 129
        rnkeytopsort = 130
        rikeytopsort = 131
        rukeytopsort = 132
PPCODE:
        check_keygen(aTHX_ keygen);
        XSRETURN(_keytop(aTHX_ ix, keygen, top, MODE_SORT, 2, items-2, ax, (GIMME_V == G_ARRAY)));

void
topsort(IV top, ...)

Top.xs  view on Meta::CPAN

        rtopsort = 128
        rltopsort = 129
        rntopsort = 130
        ritopsort = 131
        rutopsort = 132
PPCODE:
        XSRETURN(_keytop(aTHX_ ix, 0, top, MODE_SORT, 1, items-1, ax, (GIMME_V == G_ARRAY)));

void
keyhead(SV *keygen, ...)
PROTOTYPE: &@

Top.xs  view on Meta::CPAN

        rkeyhead = 128
        rlkeyhead = 129
        rnkeyhead = 130
        rikeyhead = 131
        rukeyhead = 132
PPCODE:
        check_keygen(aTHX_ keygen);
        XSRETURN(_keytop(aTHX_ ix, keygen, 1, 0, 1, items-1, ax, 0));

void
keytail(SV *keygen, ...)

Top.xs  view on Meta::CPAN

        rkeytail = 128
        rlkeytail = 129
        rnkeytail = 130
        rikeytail = 131
        rukeytail = 132
PPCODE:
        check_keygen(aTHX_ keygen);
        XSRETURN(_keytop(aTHX_ ix, keygen, -1, 0, 1, items-1, ax, 0));

void
head(...)

Top.xs  view on Meta::CPAN

        rhead = 128
        rlhead = 129
        rnhead = 130
        rihead = 131
        ruhead = 132
PPCODE:
        XSRETURN(_keytop(aTHX_ ix, 0, 1, 0, 0, items, ax, 0));

void
tail(...)
PROTOTYPE: @

Top.xs  view on Meta::CPAN

        rtail = 128
        rltail = 129
        rntail = 130
        ritail = 131
        rutail = 132
PPCODE:
        XSRETURN(_keytop(aTHX_ ix, 0, -1, 0, 0, items, ax, 0));

void
keyatpos(SV *keygen, IV n, ...)
PROTOTYPE: &@

Top.xs  view on Meta::CPAN

        rkeyatpos = 128
        rlkeyatpos = 129
        rnkeyatpos = 130
        rikeyatpos = 131
        rukeyatpos = 132
PPCODE:
        check_keygen(aTHX_ keygen);
        XSRETURN(_keytop(aTHX_ ix, keygen, (n < 0 ? n : n + 1), 1, 2, items-2, ax, 0));

void
atpos(IV n, ...)

Top.xs  view on Meta::CPAN

        ratpos = 128
        rlatpos = 129
        rnatpos = 130
        riatpos = 131
        ruatpos = 132
PPCODE:
        XSRETURN(_keytop(aTHX_ ix, 0, (n < 0 ? n : n + 1), 1, 1, items-1, ax, 0));

void
slottop(SV *slot, IV top, ...)
PROTOTYPE: @

Top.xs  view on Meta::CPAN

        rslottop = 128
        rlslottop = 129
        rnslottop = 130
        rislottop = 131
        ruslottop = 132
PPCODE:
        check_slot(aTHX_ slot);
        XSRETURN(_keytop(aTHX_ ix, slot, top, 0, 2, items-2, ax, (GIMME_V == G_ARRAY)));

void
slotpart(SV *slot, IV top, ...)

Top.xs  view on Meta::CPAN

        rslotpart = 128
        rlslotpart = 129
        rnslotpart = 130
        rislotpart = 131
        ruslotpart = 132
PPCODE:
        check_slot(aTHX_ slot);
        XSRETURN(_keytop(aTHX_ ix, slot, top, MODE_PART, 2, items-2, ax, (GIMME_V == G_ARRAY)));

void
slotpartref(SV *slot, IV top, ...)

Top.xs  view on Meta::CPAN

        rslotpartref = 128
        rlslotpartref = 129
        rnslotpartref = 130
        rislotpartref = 131
        ruslotpartref = 132
PPCODE:
        check_slot(aTHX_ slot);
        XSRETURN(_keytop(aTHX_ ix, slot, top, MODE_PARTREF, 2, items-2, ax, (GIMME_V == G_ARRAY)));

void
slottopsort(SV *slot, IV top, ...)

Top.xs  view on Meta::CPAN

        rslottopsort = 128
        rlslottopsort = 129
        rnslottopsort = 130
        rislottopsort = 131
        ruslottopsort = 132
PPCODE:
        check_slot(aTHX_ slot);
        XSRETURN(_keytop(aTHX_ ix, slot, top, MODE_SORT, 2, items-2, ax, (GIMME_V == G_ARRAY)));

void
slothead(SV *slot, ...)

Top.xs  view on Meta::CPAN

        rslothead = 128
        rlslothead = 129
        rnslothead = 130
        rislothead = 131
        ruslothead = 132
PPCODE:
        check_slot(aTHX_ slot);
        XSRETURN(_keytop(aTHX_ ix, slot, 1, 0, 1, items-1, ax, 0));

void
slottail(SV *slot, ...)

Top.xs  view on Meta::CPAN

        rslottail = 128
        rlslottail = 129
        rnslottail = 130
        rislottail = 131
        ruslottail = 132
PPCODE:
        check_slot(aTHX_ slot);
        XSRETURN(_keytop(aTHX_ ix, slot, -1, 0, 1, items-1, ax, 0));

void
slotatpos(SV *slot, IV n, ...)

Top.xs  view on Meta::CPAN

        rslotatpos = 128
        rlslotatpos = 129
        rnslotatpos = 130
        rislotatpos = 131
        ruslotatpos = 132
PPCODE:
        check_slot(aTHX_ slot);
        XSRETURN(_keytop(aTHX_ ix, slot, (n < 0 ? n : n + 1), 1, 2, items-2, ax, 0));

 view all matches for this distribution


Sort-Key

 view release on metacpan or  search on metacpan

Key.xs  view on Meta::CPAN

    rkeysort = 128
    rlkeysort = 129
    rnkeysort = 130
    rikeysort = 131
    rukeysort = 132
PPCODE:
    items--;
    if (items) {
	_keysort(aTHX_ ix, keygen, 0, 1, ax, items);
        SPAGAIN;
	SP = &ST(items-1);

Key.xs  view on Meta::CPAN

    rkeysort_inplace = 128
    rlkeysort_inplace = 129
    rnkeysort_inplace = 130
    rikeysort_inplace = 131
    rukeysort_inplace = 132
PPCODE:
    if ((len=av_len(values)+1)) {
	/* warn("ix=%d\n", ix); */
	if (SvMAGICAL(values) || AvREIFY(values)) {
	    int i;
	    magic_values = values;

Key.xs  view on Meta::CPAN

    rsort = 128
    rlsort = 129
    rnsort = 130
    risort = 131
    rusort = 132
PPCODE:
    if (items) {
	_keysort(aTHX_ ix, 0, 0, 0, ax, items);
        SPAGAIN;
	SP = &ST(items-1);
    }

Key.xs  view on Meta::CPAN

    rsort_inplace = 128
    rlsort_inplace = 129
    rnsort_inplace = 130
    risort_inplace = 131
    rusort_inplace = 132
PPCODE:
    if ((len=av_len(values)+1)) {
	/* warn("ix=%d\n", ix); */
	if (SvMAGICAL(values) || AvREIFY(values)) {
	    int i;
	    magic_values = values;

 view all matches for this distribution


Sort-Naturally-ICU

 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:
	type = constant(aTHX_ s, len);
      /* Return 1 or 2 items. First is error message, or undef if no error.
           Second, if present, is found value */
        switch (type) {
        case PERL_constant_NOTFOUND:

 view all matches for this distribution


Sort-Naturally-XS

 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:
	type = constant(aTHX_ s, len);
      /* Return 1 or 2 items. First is error message, or undef if no error.
           Second, if present, is found value */
        switch (type) {
        case PERL_constant_NOTFOUND:

 view all matches for this distribution


Speech-Recognition-Vosk

 view release on metacpan or  search on metacpan

Vosk.xs  view on Meta::CPAN

void
Vosk_model_free (model)
	SV *	model
        PREINIT:
        I32* temp;
        PPCODE:
        temp = PL_markstack_ptr++;
        Vosk_model_free(model);
        if (PL_markstack_ptr != temp) {
          /* truly void, because dXSARGS not invoked */
          PL_markstack_ptr = temp;

Vosk.xs  view on Meta::CPAN

void
Vosk_recognizer_free (recognizer)
	SV *	recognizer
        PREINIT:
        I32* temp;
        PPCODE:
        temp = PL_markstack_ptr++;
        Vosk_recognizer_free(recognizer);
        if (PL_markstack_ptr != temp) {
          /* truly void, because dXSARGS not invoked */
          PL_markstack_ptr = temp;

Vosk.xs  view on Meta::CPAN

Vosk_recognizer_set_words (recognizer, words)
	SV *	recognizer
	int	words
        PREINIT:
        I32* temp;
        PPCODE:
        temp = PL_markstack_ptr++;
        Vosk_recognizer_set_words(recognizer, words);
        if (PL_markstack_ptr != temp) {
          /* truly void, because dXSARGS not invoked */
          PL_markstack_ptr = temp;

Vosk.xs  view on Meta::CPAN

	SV *	recognizer

void
Vosk_set_log_level(log_level)
    int log_level
        PPCODE:
        vosk_set_log_level(log_level);
        return;

 view all matches for this distribution


Speech-Recognizer-SPX

 view release on metacpan or  search on metacpan

Audio/SPX.xs  view on Meta::CPAN

	cont_ad_t *	cont
	PREINIT:
		int32	res, delta_sil, delta_speech, min_noise, max_noise,
			winsize, speech_onset, sil_onset, leader, trailer;
		float32 adapt_rate;
	PPCODE:
#ifdef HAVE_ADAPT_RATE
		res = cont_ad_get_params(cont, &delta_sil, &delta_speech,
					&min_noise, &max_noise, &winsize, &speech_onset,
					&sil_onset, &leader, &trailer, &adapt_rate);
#else

 view all matches for this distribution


Speech-Swift

 view release on metacpan or  search on metacpan

Swift.xs  view on Meta::CPAN

		int16_t *buffer = NULL;
		int samples = 0;
		int bytes_per_sample = 0;
		int i = 0;

	PPCODE:
		if (SWIFT_FAILED(swift_waveform_get_samples(_wave, (const void**)&buffer, &samples, &bytes_per_sample)))
		{
			croak("failed to get samples from waveform object");
		}

 view all matches for this distribution


Speech-eSpeak

 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


Spread-Client-Constant

 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


Spread

 view release on metacpan or  search on metacpan

Spread.xs  view on Meta::CPAN

	  SV **afetch;
	  int i, error, pr, gm;
	  mailbox mbox = -1;
	  char *sn, *pn, pg[MAX_GROUP_NAME];
	  HV *hv;
	PPCODE:
	  MAILBOX = PRIVATE_GROUP = &PL_sv_undef;
	  if(!SvROK(rv) || SvTYPE(hv = (HV *)SvRV(rv))!=SVt_PVHV)
	    croak("not a HASH reference");
	  for(i=0;i<nconnect_params;i++)
	    if(hv_exists(hv, connect_params[i],

Spread.xs  view on Meta::CPAN

	  static char *groups=NULL;
	  static char *mess=NULL;
	  char sender[MAX_GROUP_NAME];
	  SV *STYPE, *MTYPE, *MESSAGE, *SENDER, *ENDMIS, *ERROR;
	  AV *GROUPS=(AV *)&PL_sv_undef;
	PPCODE:
	  if(svmbox == &PL_sv_undef) {
	    STYPE=SENDER=MTYPE=ENDMIS=MESSAGE=&PL_sv_undef;
	    SetSpErrorNo(ILLEGAL_SESSION);
	    goto rec_ending;
	  }

 view all matches for this distribution


Starlink-AST

 view release on metacpan or  search on metacpan

lib/Starlink/AST.xs  view on Meta::CPAN

void
astStripEscapes( text )
  char * text
 PREINIT:
  const char * RETVAL;
 PPCODE:
  ASTCALL(
    RETVAL = astStripEscapes( text );
  )
  if (RETVAL) {
    XPUSHs(sv_2mortal(newSVpvn(RETVAL,strlen(RETVAL))));

lib/Starlink/AST.xs  view on Meta::CPAN

 PREINIT:
  int argoff = 1; /* number of fixed arguments */
  int nargs;
  char buff[200];
  char * value = 0;
 PPCODE:
  nargs = items - argoff;
  switch (nargs) {
    case 0:
      break;
    case 1:

lib/Starlink/AST.xs  view on Meta::CPAN

  AstFrame * frm2
 PREINIT:
  int naxes;
  int * caxes;
  AV * axes;
 PPCODE:
  naxes = astGetI( frm2, "Naxes" );
  caxes = get_mortalspace( naxes, 'i' );

  ASTCALL(
    astMatchAxes( frm1, frm2, caxes );

lib/Starlink/AST.xs  view on Meta::CPAN


void
MirrorVariants( this, iframe )
  AstFrameSet * this
  int iframe
 PPCODE:
  ASTCALL(
    astMirrorVariants( this, iframe );
  )


lib/Starlink/AST.xs  view on Meta::CPAN

 PREINIT:
  int nel;
  double * ccoeffs;
  int ncoeff;
  AV * coeffs;
 PPCODE:
  ASTCALL(
    astPolyCoeffs( this, forward, 0, 0, &ncoeff );
  )
  nel = ncoeff * (astGetI(this, forward ? "Nin" : "Nout") + 2);
  ccoeffs = get_mortalspace( nel, 'd' );

lib/Starlink/AST.xs  view on Meta::CPAN

  int len;
  double * clbnd;
  double * cubnd;
  AV * lbnd;
  AV * ubnd;
 PPCODE:
  len = astGetI(this, forward ? "Nin" : "Nout");
  clbnd = get_mortalspace( len, 'd' );
  cubnd = get_mortalspace( len, 'd' );
  ASTCALL(
    astChebyDomain( this, forward, clbnd, cubnd );

lib/Starlink/AST.xs  view on Meta::CPAN

  char * cvt
  AV * args
 PREINIT:
  int narg;
  double * cargs;
 PPCODE:
  narg = av_len(args) + 1;
  cargs = pack1D( newRV_noinc((SV*)args), 'd');
  ASTCALL(
    astTimeAdd( this, cvt, narg, cargs );
  )

lib/Starlink/AST.xs  view on Meta::CPAN

  AstObject * this
 PREINIT:
   const char * routine;
   const char * file;
   int line;
 PPCODE:
  ASTCALL(
    astCreatedAt( this, &routine, &file, &line );
  )
  XPUSHs(sv_2mortal(newSVpvn(routine,strlen(routine))));
  XPUSHs(sv_2mortal(newSVpvn(file,strlen(file))));

lib/Starlink/AST.xs  view on Meta::CPAN

void
astToString( this )
  AstObject * this
 PREINIT:
  char * string;
 PPCODE:
  ASTCALL(
    string = astToString( this );
  )
  XPUSHs(sv_2mortal(newSVpvn(string,strlen(string))));
  astFree( string );

lib/Starlink/AST.xs  view on Meta::CPAN


void
astMapCopy( this, that )
  AstKeyMap * this
  AstKeyMap * that
 PPCODE:
  ASTCALL(
    astMapCopy( this, that );
  )

void

lib/Starlink/AST.xs  view on Meta::CPAN

  AstKeyMap * this
  char * key
 PREINIT:
  double RETVAL;
  int status;
 PPCODE:
  ASTCALL(
    status = astMapGet0D( this, key, &RETVAL );
  )
  if (status != 0) {
    XPUSHs(sv_2mortal(newSVnv(RETVAL)));

lib/Starlink/AST.xs  view on Meta::CPAN

 PREINIT:
  int RETVAL;
  int status;
 ALIAS:
   MapGet0S = 1
 PPCODE:
  ASTCALL(
    status = astMapGet0I( this, key, &RETVAL );
  )
  if (status != 0) {
    XPUSHs(sv_2mortal(newSViv(RETVAL)));

lib/Starlink/AST.xs  view on Meta::CPAN

  AstKeyMap * this
  char * key
 PREINIT:
  char * RETVAL;
  int status;
 PPCODE:
  ASTCALL(
    status = astMapGet0C( this, key, (const char **)&RETVAL );
  )
  if (status != 0) {
    XPUSHs(sv_2mortal(newSVpvn(RETVAL,strlen(RETVAL))));

lib/Starlink/AST.xs  view on Meta::CPAN

  char * key
 PREINIT:
  AstObject * RETVAL;
  int status;
  SV * sv;
 PPCODE:
  ASTCALL(
    status = astMapGet0A( this, key, &RETVAL );
  )
  if (status != 0) {
    /* Have an AstObject pointer. Convert to object. */

lib/Starlink/AST.xs  view on Meta::CPAN

 PREINIT:
  int i;
  int status;
  double * outarr;
  int nelems;
 PPCODE:
  /* First we need to find out how many elements are in the KeyMap */
  nelems = astMapLength( this, key );
  if (nelems == 0) {
    XSRETURN_EMPTY;
  }

lib/Starlink/AST.xs  view on Meta::CPAN

  int status;
  int * outarr;
  int nelems;
 ALIAS:
  MapGet1S = 1
 PPCODE:
  /* First we need to find out how many elements are in the KeyMap */
  nelems = astMapLength( this, key );
  if (nelems == 0) {
    XSRETURN_EMPTY;
  }

lib/Starlink/AST.xs  view on Meta::CPAN

  SV * sv;
  int i;
  int status;
  AstObject ** outarr;
  int nelems;
 PPCODE:
  /* First we need to find out how many elements are in the KeyMap */
  nelems = astMapLength( this, key );
  if (nelems == 0) {
    XSRETURN_EMPTY;
  }

lib/Starlink/AST.xs  view on Meta::CPAN

  int status;
  char * buffer;
  char * tmpp;
  int nelems;
  int maxlen = 80; /* max length of each string in map. Includes NUL */
 PPCODE:
  /* First we need to find out how many elements are in the KeyMap */
  nelems = astMapLength( this, key );
  if (nelems == 0) {
    XSRETURN_EMPTY;
  }

lib/Starlink/AST.xs  view on Meta::CPAN

astMapGetC( this, key )
  AstKeyMap * this
  char * key
 PREINIT:
  const char * RETVAL = 0;
 PPCODE:
  ASTCALL(
    astMapGetC( this, key, &RETVAL );
  )
  if (RETVAL) {
    XPUSHs(sv_2mortal(newSVpvn(RETVAL,strlen(RETVAL))));

lib/Starlink/AST.xs  view on Meta::CPAN

void
astMapRename( this, oldkey, newkey )
  AstKeyMap * this
  char * oldkey
  char * newkey
 PPCODE:
  ASTCALL(
    astMapRename( this, oldkey, newkey );
  )

int

lib/Starlink/AST.xs  view on Meta::CPAN

ColumnName( this, index )
  AstTable * this
  int index
 PREINIT:
  const char * RETVAL;
 PPCODE:
  ASTCALL(
    RETVAL = astColumnName( this, index );
  )
  XPUSHs(sv_2mortal(newSVpvn(RETVAL,strlen(RETVAL))));

lib/Starlink/AST.xs  view on Meta::CPAN

  char * column
 PREINIT:
  int ndim;
  int cdims[10];
  AV * dims;
 PPCODE:
  /* Unsure how to determine required size because astGetColumnNdim is protected.
     Therefore use fixed size 10 for now. */
  ASTCALL(
    astColumnShape( this, column, 10, &ndim, cdims );
  )

lib/Starlink/AST.xs  view on Meta::CPAN

ParameterName( this, index )
  AstTable * this
  int index
 PREINIT:
  const char * cname;
 PPCODE:
  ASTCALL(
    cname = astParameterName( this, index );
  )
  if (cname) {
    XPUSHs(sv_2mortal(newSVpvn(cname,strlen(cname))));

lib/Starlink/AST.xs  view on Meta::CPAN

  }

void
PurgeRows( this )
  AstTable * this
 PPCODE:
  ASTCALL(
    astPurgeRows( this );
  )

void
RemoveColumn( this, name )
  AstTable * this
  char * name
 PPCODE:
  ASTCALL(
    astRemoveColumn( this, name );
  )

void
RemoveParameter( this, name )
  AstTable * this
  char * name
 PPCODE:
  ASTCALL(
    astRemoveParameter( this, name );
  )

void
RemoveRow( this, index )
  AstTable * this
  int index
 PPCODE:
  ASTCALL(
    astRemoveRow( this, index );
  )


lib/Starlink/AST.xs  view on Meta::CPAN

   int RETVAL;
   int set = 0;
   int newval = 0;
   int wasset;
   int hasnull;
 PPCODE:
  nargs = items - argoff;
  switch (nargs) {
    case 0:
      break;
    case 1:

lib/Starlink/AST.xs  view on Meta::CPAN


void
PutTableHeader( this, header )
  AstFitsTable * this
  AstFitsChan * header
 PPCODE:
  ASTCALL(
    astPutTableHeader( this, header );
  )


lib/Starlink/AST.xs  view on Meta::CPAN

  AV * values
 PREINIT:
  int nval;
  double * cvalues;
  AV * nvalues;
 PPCODE:
  nval = av_len( values ) + 1;
  cvalues = pack1D( newRV_noinc((SV*)values), 'd' );
  ASTCALL(
    astAxNorm( this, axis, oper, nval, cvalues );
  )

lib/Starlink/AST.xs  view on Meta::CPAN

  double * ca2;
  double * cb1;
  double * cb2;
  double * ccross;
  AV * cross;
 PPCODE:
  naxes = astGetI( this, "Naxes" );

  len = av_len( a1 ) + 1;
  if ( len != naxes ) Perl_croak( aTHX_ "a1 must contain %d elements", naxes );
  ca1 = pack1D(newRV_noinc((SV*)a1), 'd');

lib/Starlink/AST.xs  view on Meta::CPAN

  int naxes;
  double * aa;
  int i;
  int ncoord_in;
  double * inputs;
 PPCODE:
  /* Create C arrays of the correct dimensions */
  naxes = astGetI( this, "Naxes" );
  ncoord_in = items - argoff;

  /* Copy from the perl array to the C array */

lib/Starlink/AST.xs  view on Meta::CPAN

  double * aa;
  double * bb;
  double * point3;
  int i;
  AV * myoffset;
 PPCODE:
  naxes = astGetI( this, "Naxes" );

  /* Copy from the perl array to the C array */
  if (av_len(point1) != naxes-1)
     Perl_croak(aTHX_ "Number of elements in first coord array must be %d",

lib/Starlink/AST.xs  view on Meta::CPAN

  double * aa;
  double * point2;
  int i;
  double RETVAL;
  AV * myoffset;
 PPCODE:
  naxes = astGetI( this, "Naxes" );

  /* Copy from the perl array to the C array */
  if (av_len(point1) != naxes-1)
     Perl_croak(aTHX_ "Number of elements in first coord array must be %d",

lib/Starlink/AST.xs  view on Meta::CPAN

  int maxaxes;
  int naxes;
  int * aa;
  AstMapping * map;
  AstFrame * newframe;
 PPCODE:
  maxaxes = astGetI(this, "Naxes");
  naxes = av_len(axes) + 1;
  if ( naxes > maxaxes )
    Perl_croak(aTHX_ "Number of axes selected must be less than number of axes in frame");
  aa = pack1D( newRV_noinc((SV*)axes), 'i');

lib/Starlink/AST.xs  view on Meta::CPAN

  AV * point4;
  double d1;
  double d2;
  int len;
  int naxes;
 PPCODE:
  naxes = astGetI(this, "Naxes");
  len = av_len(point1) + 1;
  if ( naxes != len )
    Perl_croak(aTHX_ "Number of coords in point1 must be equal to the number of axes in frame [%d != %d]", naxes, len);
  len = av_len(point2) + 1;

lib/Starlink/AST.xs  view on Meta::CPAN

  AstMapping * map1;
  AstMapping * map2;
  int series;
  int invert1;
  int invert2;
 PPCODE:
  Perl_croak(aTHX_ "astDecompose not yet implemented\n");
  /* May want to restrict this to CmpMap and CmpFrame classes
     explicitly */
  ASTCALL(
   astDecompose(this, &map1, &map2, &series, &invert1, &invert2);

lib/Starlink/AST.xs  view on Meta::CPAN

  int nout;
  int ncoeff;
  double * fit;
  int i;
  int status;
 PPCODE:
  /* get the input values and verify them */
  nin = astGetI( this, "Nin" );
  len = av_len( lbnd ) + 1;
  if ( len != nin ) Perl_croak( aTHX_ "lbnd must contain %d elements", nin );
  len = av_len( ubnd ) + 1;

lib/Starlink/AST.xs  view on Meta::CPAN

  double * cxu = NULL;
  double lbnd_out;
  double ubnd_out;
  AV * xl = NULL;
  AV * xu = NULL;
 PPCODE:
  nin = astGetI( this, "Nin" );
  len = av_len( lbnd_in ) + 1;
  if ( len != nin ) Perl_croak( aTHX_ "lbnd must contain %d elements", nin );
  len = av_len( ubnd_in ) + 1;
  if ( len != nin ) Perl_croak( aTHX_ "ubnd must contain %d elements", nin );

lib/Starlink/AST.xs  view on Meta::CPAN

  int nin;
  int nout;
  int * cin;
  int * cout;
  AstMapping * outmap = NULL;
 PPCODE:
  nin = av_len( in ) + 1;
  cin = pack1D(newRV_noinc((SV*)in), 'i');

  /* output array */
  nout = astGetI( this, "Nout" );

lib/Starlink/AST.xs  view on Meta::CPAN

  double RETVAL;
  int nin;
  int len;
  double * cat;
  double d2;
 PPCODE:
  nin = astGetI( this, "Nin");
  len = av_len( at ) + 1;
  if (nin != len)
      Perl_croak(aTHX_ "Must supply Nin coordinates to astRate [%d != %d]",
                        nin, len);

lib/Starlink/AST.xs  view on Meta::CPAN

  double * cubnd;
  double * cfit;
  double rms;
  int status;
  AV * fit;
 PPCODE:
  nin = astGetI( this, "Nin" );
  nout = astGetI( this, "Nout" );
  len = av_len( lbnd ) + 1;
  if ( len != nin ) Perl_croak( aTHX_ "lbnd must contain %d elements", nin );
  len = av_len( ubnd ) + 1;

lib/Starlink/AST.xs  view on Meta::CPAN

 OUTPUT:
  RETVAL

# astTran1
#   Returns one array
# Even though we return one array, we use PPCODE so that it is closer to
# the code used for astTran2

void
astTran1( this, xin, forward )
  AstMapping * this

lib/Starlink/AST.xs  view on Meta::CPAN

  int len1;
  double * cxin;
  AV* xout;
  double * cxout;
  SV** elem;
 PPCODE:
  len1 = av_len( xin ) + 1;
  cxin = pack1D( newRV_noinc((SV*)xin), 'd');
  cxout = get_mortalspace( len1, 'd' );

  ASTCALL(

lib/Starlink/AST.xs  view on Meta::CPAN

  AV* xout;
  AV* yout;
  double * cxout;
  double * cyout;
  SV** elem;
 PPCODE:
  len1 = av_len( xin ) + 1;
  len2 = av_len( yin ) + 1;
  if ( len1 != len2 )
     Perl_croak(aTHX_ "Number of elements in input arrays must be identical (%d != %d )",
             len1, len2);

lib/Starlink/AST.xs  view on Meta::CPAN

  int naxout;
  int ncoord_in;
  int ncoord_out;
  double **ptr_in;
  double **ptr_out;
 PPCODE:
  /* Make sure we have some coordinates to transform */
  ndims = items - argoff;
  if (ndims > 0) {
    /* Number of in and output coordinates required for this mapping */
    naxin = astGetI( this, "Nin" );

lib/Starlink/AST.xs  view on Meta::CPAN

  AstRegion * this
 PREINIT:
  double ccentre[2];
  double radius;
  AV * centre;
 PPCODE:
  ASTCALL(
    astGetRegionDisc( this, ccentre, &radius );
  )

  centre = newAV();

lib/Starlink/AST.xs  view on Meta::CPAN

 PREINIT:
  int naxes;
  int npoint;
  double * cpoints;
  AV * points;
 PPCODE:
  naxes = astGetI( this, "Naxes" );
  ASTCALL(
    astGetRegionPoints( this, 0, naxes, &npoint, 0 );
  )
  cpoints = get_mortalspace( naxes * npoint,'d');

lib/Starlink/AST.xs  view on Meta::CPAN

  double * cin;
  int nelem;
  int i;
  AV * output;
  int nmasked;
 PPCODE:
  ndims = astGetI( map, "Nout" );
  len = av_len( lbnd ) + 1;
  if ( len != ndims ) Perl_croak( aTHX_ "lbnd must contain %d elements", ndims );
  len = av_len( ubnd ) + 1;
  if ( len != ndims ) Perl_croak( aTHX_ "ubnd must contain %d elements", ndims );

lib/Starlink/AST.xs  view on Meta::CPAN

  int i;
  double * clbnd;
  double * cubnd;
  AV * lbnd;
  AV * ubnd;
 PPCODE:
  naxes = astGetI( this, "Naxes" );
  clbnd = get_mortalspace( naxes, 'd' );
  cubnd = get_mortalspace( naxes, 'd' );

  ASTCALL(

lib/Starlink/AST.xs  view on Meta::CPAN

  double * cpoints;
  AV * points;
  AV * coord;
  int i;
  int axis;
 PPCODE:
  naxes = astGetI( this, "Naxes" );

  ASTCALL(
    astGetRegionMesh( this, surface, 0, 0, &maxpoint, 0 );
  )

lib/Starlink/AST.xs  view on Meta::CPAN

void
astShowMesh( this, format, ttl )
  AstRegion * this
  int format
  char * ttl
 PPCODE:
  ASTCALL(
    astShowMesh( this, format, ttl);
  )

int

lib/Starlink/AST.xs  view on Meta::CPAN

  double * cp1;
  double * cp2;
  AV * centre;
  AV * p1;
  AV * p2;
 PPCODE:
  naxes = astGetI( this, "Naxes" );
  ccentre = get_mortalspace( naxes, 'd' );
  cp1 = get_mortalspace( naxes, 'd' );
  cp2 = get_mortalspace( naxes, 'd' );

lib/Starlink/AST.xs  view on Meta::CPAN

  double * ccentre;
  double radius;
  double * cp1;
  AV * centre;
  AV * p1;
 PPCODE:
  naxes = astGetI( this, "Naxes" );
  ccentre = get_mortalspace( naxes, 'd' );
  cp1 = get_mortalspace( naxes, 'd' );

  ASTCALL(

lib/Starlink/AST.xs  view on Meta::CPAN

  AstMoc * this
  int icell
 PREINIT:
  int order;
  int64_t npix;
 PPCODE:
  ASTCALL(
    astGetCell( this, icell, &order, &npix );
  )
  XPUSHs(sv_2mortal(newSViv(order)));
  XPUSHs(sv_2mortal(newSViv(npix)));

lib/Starlink/AST.xs  view on Meta::CPAN

  int nb;
  size_t ln;
  size_t mxsize;
  void * cdata;
  AV * data;
 PPCODE:
  nb = astGetI( this, "moctype" );
  ln = astGetI( this, "moclength" );
  mxsize = nb * ln;
  cdata = get_mortalspace( mxsize, 'u' );
  ASTCALL(

lib/Starlink/AST.xs  view on Meta::CPAN

  AstMoc * this
  int json
 PREINIT:
   size_t size;
   char * RETVAL;
 PPCODE:
  ASTCALL(
    astGetMocString( this, json, 0, 0, &size );
  )
  RETVAL = get_mortalspace( size, 'u' );
  ASTCALL(

lib/Starlink/AST.xs  view on Meta::CPAN

  )

void
astPurgeWCS( this )
  AstFitsChan * this
 PPCODE:
  ASTCALL(
    astPurgeWCS( this );
  )

void

lib/Starlink/AST.xs  view on Meta::CPAN

void
astPutTable( this, table, extnam )
  AstFitsChan * this
  AstFitsTable *table
  char * extnam
 PPCODE:
  ASTCALL(
    astPutTable( this, table, extnam );
  )

void
astRemoveTables( this, key )
  AstFitsChan * this
  char * key
 PPCODE:
  ASTCALL(
    astRemoveTables( this, key );
  )

void
astRetainFits( this )
  AstFitsChan * this
 PPCODE:
  ASTCALL(
    astRetainFits( this );
  )

void
astShowFits( this )
  AstFitsChan * this
 PPCODE:
  ASTCALL(
    astShowFits( this );
  )

void

lib/Starlink/AST.xs  view on Meta::CPAN

  AstFitsChan * this
  char * name
 PREINIT:
  int RETVAL;
  int there;
 PPCODE:
  ASTCALL(
    RETVAL = astTestFits( this, name, &there );
  )
  XPUSHs(sv_2mortal(newSViv(RETVAL)));
  XPUSHs(sv_2mortal(newSViv(there)));

lib/Starlink/AST.xs  view on Meta::CPAN

astGetFitsF( this, name )
  AstFitsChan * this
  char * name
 PREINIT:
  int status;
 PPCODE:
  ASTCALL(
    status = astGetFitsF( this, name, &RETVAL );
  )
  if (status) {
    XPUSHs(sv_2mortal(newSVnv(RETVAL)));

lib/Starlink/AST.xs  view on Meta::CPAN

astGetFitsI( this, name )
  AstFitsChan * this
  char * name
 PREINIT:
  int status;
 PPCODE:
  ASTCALL(
    status = astGetFitsI( this, name, &RETVAL );
  )
  if (status) {
    XPUSHs(sv_2mortal(newSViv(RETVAL)));

lib/Starlink/AST.xs  view on Meta::CPAN

astGetFitsL( this, name )
  AstFitsChan * this
  char * name
 PREINIT:
  int status;
 PPCODE:
  ASTCALL(
    status = astGetFitsL( this, name, &RETVAL );
  )
  if (status) {
    XPUSHs(sv_2mortal(newSViv(RETVAL)));

lib/Starlink/AST.xs  view on Meta::CPAN

  AstFitsChan * this
  char * name
 PREINIT:
  char * RETVAL;
  int status;
 PPCODE:
  ASTCALL(
    status = astGetFitsS( this, name, &RETVAL );
  )
  if (status) {
    XPUSHs(sv_2mortal(newSVpvn(RETVAL,strlen(RETVAL))));

lib/Starlink/AST.xs  view on Meta::CPAN

  AstFitsChan * this
  char * name
 PREINIT:
  char * RETVAL;
  int status;
 PPCODE:
  ASTCALL(
    status = astGetFitsCN( this, name, &RETVAL );
  )
  if (status) {
    XPUSHs(sv_2mortal(newSVpvn(RETVAL,strlen(RETVAL))));

lib/Starlink/AST.xs  view on Meta::CPAN


void
astPutTables( this, tables )
  AstFitsChan * this
  AstKeyMap * tables
 PPCODE:
  ASTCALL(
    astPutTables( this, tables );
  )

void
astReadFits( this )
  AstFitsChan * this
 PPCODE:
  ASTCALL(
    astReadFits( this );
  )

void
astWriteFits( this )
  AstFitsChan * this
 PPCODE:
  ASTCALL(
    astWriteFits( this );
  )


lib/Starlink/AST.xs  view on Meta::CPAN

  AstSpecFrame * this
  AstSkyFrame * frm
 PREINIT:
  double lon;
  double lat;
 PPCODE:
  ASTCALL(
   astGetRefPos( this, frm, &lon, &lat );
  )
  XPUSHs(sv_2mortal(newSVnv(lon)));
  XPUSHs(sv_2mortal(newSVnv(lat)));

lib/Starlink/AST.xs  view on Meta::CPAN

  float clbnd[2];
  float cubnd[2];
  AV* lbnd;
  AV* ubnd;
  SV * arg = ST(0);
 PPCODE:
  PLOTCALL (arg,
   astBoundingBox( this, clbnd, cubnd );
  )
  lbnd = newAV();
  unpack1D( newRV_noinc((SV*) lbnd), clbnd, 'f', 2 );

lib/Starlink/AST.xs  view on Meta::CPAN

astRegionOutline( this, region )
  AstPlot * this
  AstRegion * region
 PREINIT:
  SV * arg = ST(0);
 PPCODE:
  PLOTCALL(
    arg,
    astRegionOutline( this, region );
  )

 view all matches for this distribution


Statistics-CaseResampling

 view release on metacpan or  search on metacpan

CaseResampling.xs  view on Meta::CPAN

    double lower_ci = 0.;
    double upper_ci = 0.;
    double alpha;
  INIT:
    alpha = 1.-confidence;
  PPCODE:
    if (items == 2)
      runs = 1000;
    else if (items == 3)
      runs = SvUV(ST(2));
    else {

CaseResampling.xs  view on Meta::CPAN

    double lower_ci = 0.;
    double upper_ci = 0.;
    double alpha;
  INIT:
    alpha = 1.-confidence;
  PPCODE:
    if (confidence <= 0. || confidence >= 1.) {
      croak("Confidence level has to be in (0, 1)");
    }
    avToCAry(aTHX_ statistics, &cstatistics, &nelem);
    if (nelem != 0) {

 view all matches for this distribution


Statistics-Cluto

 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


Statistics-EfficiencyCI

 view release on metacpan or  search on metacpan

EfficiencyCI.xs  view on Meta::CPAN

    double conflevel
  PREINIT:
    double mode = 0.0;
    double low = 0.0;
    double high = 0.0;
  PPCODE:
    efficiency_ci(aTHX_ k, N, conflevel, &mode, &low, &high);
    EXTEND(SP, 3);
    mPUSHn(mode);
    mPUSHn(low);
    mPUSHn(high);


void
log_gamma(x)
    double x
  PPCODE:
    dTARG;
    if (x <= 0
        && ( fabs(x - (int)x) <= DBL_EPSILON))
    {
      XSRETURN_UNDEF;

 view all matches for this distribution


Statistics-NiceR

 view release on metacpan or  search on metacpan

inc/Inline/C.pm  view on Meta::CPAN

            if ($o->{CONFIG}{_TESTING}) {
                $XS .= <<END;
        PREINIT:
        PerlIO* stream;
        I32* temp;
        PPCODE:
        temp = PL_markstack_ptr++;
        $function($arg_name_list);
      stream = PerlIO_open(\"$dir/void_test\", \"a\");
      if (stream == NULL) warn(\"%s\\n\", \"Unable to open $dir/void_test for appending\");
        if (PL_markstack_ptr != temp) {

inc/Inline/C.pm  view on Meta::CPAN

            }
            else {
                $XS .= <<END;
        PREINIT:
        I32* temp;
        PPCODE:
        temp = PL_markstack_ptr++;
        $function($arg_name_list);
        if (PL_markstack_ptr != temp) {
          /* truly void, because dXSARGS not invoked */
          PL_markstack_ptr = temp;

 view all matches for this distribution


Statistics-Suggest

 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:
	type = constant(aTHX_ s, len);
      /* Return 1 or 2 items. First is error message, or undef if no error.
           Second, if present, is found value */
        switch (type) {
        case PERL_constant_NOTFOUND:

 view all matches for this distribution


Stats-LikeR

 view release on metacpan or  search on metacpan

LikeR.xs  view on Meta::CPAN

	const char *method
	SV *order_sv
	const char *dir
	SV *limit_sv
	SV *area_sv
	PPCODE:
		if (!(SvROK(vals_ref) && SvTYPE(SvRV(vals_ref)) == SVt_PVAV))
			croak("_interp_column_xs: values must be an array reference");
		if (!(SvROK(x_ref) && SvTYPE(SvRV(x_ref)) == SVt_PVAV))
			croak("_interp_column_xs: x must be an array reference");
		ENTER; SAVETMPS;

LikeR.xs  view on Meta::CPAN

		bool *restrict complete = NULL, *restrict aliased = NULL;
		size_t *restrict ridx = NULL, *rank_map = NULL;
		size_t n = 0, n_used = 0, p, rank;
		NV **restrict X = NULL, *restrict y = NULL, rss, msres;
		IV dfres;
	PPCODE:
	{
		if (items < 2)
			croak("anova: usage anova(\\%%data, 'response ~ terms' [, 'model2', ...])");
		data = ST(0);

LikeR.xs  view on Meta::CPAN

		}
	}

void rank(...)
	PROTOTYPE: @
	PPCODE:
		int ties   = RANK_AVERAGE;
		int nalast = NALAST_TRUE;

		/* ---- locate trailing "key => value" options -------------
		 Options begin at the first plain-string arg equal to a

LikeR.xs  view on Meta::CPAN

	SV **restrict rowrefs = NULL;	// coderef mode: row ref per index
	SV **restrict colkeys = NULL;	// HoA: column key SVs
	AV **restrict colavs  = NULL;	// HoA: column AVs
	size_t ncols = 0;
	SV *restrict result = NULL;
PPCODE:
{
// ---- own the usage message (variadic: xsubpp won't invent one)
	if (items < 2 || items > 4)
		croak("Usage: csort($df, 'column.name', 'HoA')\n"
		      "   or  csort($df, sub { $b->{'No.'} <=> $a->{'No.'} }, 'hoa')\n"

LikeR.xs  view on Meta::CPAN

	OUTPUT:
		RETVAL


void filter(...)
PPCODE:
{
	if (items < 2)
		croak("Usage: filter($df, $code [, 'output.type' => 'aoh'|'hoa'])");
	SV *restrict df      = ST(0);
	SV *restrict predarg = ST(1);

LikeR.xs  view on Meta::CPAN

	RETVAL

PROTOTYPES: ENABLE

void write_table(...)
PPCODE:
{
	SV *restrict data_sv = NULL;
	SV *restrict file_sv = NULL;
	unsigned int arg_idx = 0;
	// Mimic the Perl shift logic

LikeR.xs  view on Meta::CPAN

PREINIT:
	AV *restrict av;
	HV *restrict ret_hash;
	size_t n_raw, n = 0;
	NV *restrict x, w = 0.0, p_val = 0.0, mean = 0.0, ssq = 0.0;
PPCODE:
	if (!SvROK(data) || SvTYPE(SvRV(data)) != SVt_PVAV) {
	  croak("Expected an array reference");
	}
	av = (AV *)SvRV(data);
	n_raw = av_len(av) + 1;

LikeR.xs  view on Meta::CPAN

	PREINIT:
	HV *restrict counts;
	HV *restrict originals;
	size_t max_count = 0, arg_count = 0;
	HE *restrict he;
	PPCODE:
	//counts:    string(value) -> occurrence count

	//originals: string(value) -> SV* first-seen original
	counts    = (HV *)sv_2mortal((SV *)newHV());
	originals = (HV *)sv_2mortal((SV *)newHV());

LikeR.xs  view on Meta::CPAN

	PREINIT:
		HV*restrict seen;
		AV*restrict out;
		size_t n, k;
		int gimme;
	PPCODE:
		n = 0;
		gimme = GIMME_V;
		seen = (HV*)sv_2mortal((SV*)newHV());
		out  = (AV*)sv_2mortal((SV*)newAV());
		for (size_t i = 0; i < items; i++) {

LikeR.xs  view on Meta::CPAN

	}
	OUTPUT:
		RETVAL

void prop_test(...)
PPCODE:
{
	/*Test of equality of proportions / a single proportion against a target.
	Faithful port of R's stats::prop.test (Pearson chi-square on the 2xk
	table of successes/failures, Yates correction for k<=2, Wilson score CI
	for one proportion and a Wald CI for a difference of two).*/

LikeR.xs  view on Meta::CPAN

	ST(0) = sv_2mortal(newRV_noinc((SV *)ret));
	XSRETURN(1);
}

void mcnemar_test(...)
PPCODE:
{
/*McNemar's test for paired categorical data.  Faithful port of R's
 stats::mcnemar.test (chi-square on the off-diagonal disagreement,
 with Yates continuity correction for a 2x2 table).  An `exact => 1`
 option gives the two-sided exact binomial test for a 2x2 table.*/

LikeR.xs  view on Meta::CPAN

	ST(0) = sv_2mortal(newRV_noinc((SV *)ret));
	XSRETURN(1);
}

void dunn_test(...)
PPCODE:
{
	/*Dunn's (1964) post-hoc test following a Kruskal-Wallis test: pairwise
	rank-mean comparisons using the shared ranking and tie correction, with
	a family-wise / FDR adjustment.  Two-sided p-values (as in FSA::dunnTest).
	Validated against the canonical formula implemented in base R.*/

LikeR.xs  view on Meta::CPAN

	ST(0) = sv_2mortal(newRV_noinc((SV*)out));
	XSRETURN(1);
}

void friedman_test(...)
PPCODE:
{
	/*Friedman rank-sum test for an unreplicated complete block design.
	Input is a matrix (array of array refs) with one block/subject per row
	and one treatment/condition per column.  Faithful port of R's
	stats::friedman.test, including the tie correction.*/

LikeR.xs  view on Meta::CPAN

	ST(0) = sv_2mortal(newRV_noinc((SV *)ret));
	XSRETURN(1);
}

void epi_2x2(...)
PPCODE:
{
	NV a, b, c, d, conf_level = 0.95;
	int correct = 0, opt_start;
	if (items < 1)
		croak("Usage: epi_2x2(a, b, c, d, conf_level => 0.95, correct => 0)\n"

LikeR.xs  view on Meta::CPAN

	ST(0) = sv_2mortal(newRV_noinc((SV *)ret));
	XSRETURN(1);
}

void cmh_test(...)
PPCODE:
{
	if (items < 1 || !SvROK(ST(0)) || SvTYPE(SvRV(ST(0))) != SVt_PVAV)
		croak("Usage: cmh_test([ [a,b,c,d], [a,b,c,d], ... ], "
		      "conf_level => 0.95, correct => 1)");
	AV *restrict strata = (AV *)SvRV(ST(0));

LikeR.xs  view on Meta::CPAN

}
OUTPUT:
	RETVAL

void roc(...)
PPCODE:
{
	if (items < 2 || !SvROK(ST(0)) || SvTYPE(SvRV(ST(0))) != SVt_PVAV
	              || !SvROK(ST(1)) || SvTYPE(SvRV(ST(1))) != SVt_PVAV)
		croak("Usage: roc(\\@scores, \\@labels, positive => 1, "
		      "conf_level => 0.95, direction => '>')");

LikeR.xs  view on Meta::CPAN

	ST(0) = sv_2mortal(newRV_noinc((SV *)ret));
	XSRETURN(1);
}

void bedroc(...)
PPCODE:
{
	/*Boltzmann-Enhanced Discrimination of ROC (Truchon & Bayly 2007, eq. 36).
	Rewards early recognition: actives ranked near the top count far more
	than actives buried deep in the list.  alpha sets how sharply the weight
	decays with rank; ties get the average (mid)rank.*/

LikeR.xs  view on Meta::CPAN

	ST(0) = sv_2mortal(newRV_noinc((SV *)ret));
	XSRETURN(1);
}

void survfit(...)
PPCODE:
{
	if (items < 2 || !SvROK(ST(0)) || SvTYPE(SvRV(ST(0))) != SVt_PVAV
	              || !SvROK(ST(1)) || SvTYPE(SvRV(ST(1))) != SVt_PVAV)
		croak("Usage: survfit(\\@time, \\@status, group => \\@grp, conf_level => 0.95)");
	AV *restrict gav = NULL; NV conf_level = 0.95;

LikeR.xs  view on Meta::CPAN

	ST(0) = sv_2mortal(newRV_noinc((SV *)ret));
	XSRETURN(1);
}

void logrank_test(...)
PPCODE:
{
	if (items < 3 || !SvROK(ST(0)) || SvTYPE(SvRV(ST(0))) != SVt_PVAV
	              || !SvROK(ST(1)) || SvTYPE(SvRV(ST(1))) != SVt_PVAV
	              || !SvROK(ST(2)) || SvTYPE(SvRV(ST(2))) != SVt_PVAV)
		croak("Usage: logrank_test(\\@time, \\@status, \\@group)");

LikeR.xs  view on Meta::CPAN

	ST(0) = sv_2mortal(newRV_noinc((SV *)ret));
	XSRETURN(1);
}

void coxph(...)
PPCODE:
{
	if (items < 3 || !SvROK(ST(0)) || SvTYPE(SvRV(ST(0))) != SVt_PVAV
	              || !SvROK(ST(1)) || SvTYPE(SvRV(ST(1))) != SVt_PVAV
	              || !SvROK(ST(2)) || SvTYPE(SvRV(ST(2))) != SVt_PVAV)
		croak("Usage: coxph(\\@time, \\@status, \\@covariate | [\\@x1, \\@x2, ...], "

LikeR.xs  view on Meta::CPAN

	XSRETURN(1);
}

void p_adjust(...)
	PROTOTYPE: $;@
	PPCODE:
		if (items < 1)
			croak("Usage: p_adjust($p_values, $method, columns => ...)");
		SV *restrict p_sv    = ST(0);
		const char *restrict method = "holm";
		SV *restrict cols_sv = NULL;

LikeR.xs  view on Meta::CPAN

	OUTPUT:
	  RETVAL

void intersection(...)
	PROTOTYPE: @
	PPCODE:
		if (items == 0)
			croak("intersection needs >= 1 array ref");
		SP = set_multiplicity(aTHX_ SP, &ST(0), (size_t)items, 1, 0,
		                      "intersection", GIMME_V);

LikeR.xs  view on Meta::CPAN

	OUTPUT:
		RETVAL

void scale(...)
	PROTOTYPE: @
	PPCODE:
	{
		bool do_center_mean = TRUE, do_scale_sd = TRUE;
		NV center_val = 0.0, scale_val = 1.0;
		size_t data_items = items;
		// 1. Parse Options Hash (if it exists as the last argument)

LikeR.xs  view on Meta::CPAN


void seq(from, to, by = 1.0)
	NV from
	NV to
	NV by
PPCODE:
	{
		if (by == 0.0) {//Handle the zero 'by' case
			if (from == to) {
				 EXTEND(SP, 1);
				 mPUSHn(from);

LikeR.xs  view on Meta::CPAN

	}
OUTPUT:
	RETVAL

void merge(...)
PPCODE:
{
	if (items < 2)
		croak("Usage: merge($left, $right, how => 'inner'|'left'|'right'|"
		      "'outer'|'cross', on => 'col' | ['c1','c2'] "
		      "[, 'left.on' => .., 'right.on' => ..] "

LikeR.xs  view on Meta::CPAN

	STRLEN collen = 0;
	AV *restrict src_av = NULL;
	HV *restrict src_hv = NULL;
	SSize_t n = 0;
	AV *restrict out_av = NULL;
PPCODE:
{
	if (!SvOK(colname_sv))
		croak("vals: column name must be defined");
	colname = SvPV(colname_sv, collen);		//kept for the error message
	if (!SvROK(data))

LikeR.xs  view on Meta::CPAN

	IV   n, m, i, j, ne, w;
	NV  *srt  = NULL;
	NV  *edges = NULL;
	NV   p, h, frac, v;
	IV   lo, bin, lo2, hi2, mid, k;
PPCODE:
	if (!SvROK(data_ref) || SvTYPE(SvRV(data_ref)) != SVt_PVAV)
		croak("_qcut_core: data must be an ARRAY reference");
	if (!SvROK(probs_ref) || SvTYPE(SvRV(probs_ref)) != SVt_PVAV)
		croak("_qcut_core: probs must be an ARRAY reference");

LikeR.xs  view on Meta::CPAN

	PREINIT:
		HV*restrict seen;
		AV*restrict order;
		size_t nrefs, n, oi, olen;
		int gimme;
	PPCODE:
		gimme = GIMME_V;
		nrefs = items;
		if (nrefs == 0)
			croak("union needs >= 1 array ref");
		seen  = (HV*)sv_2mortal((SV*)newHV());

LikeR.xs  view on Meta::CPAN

			}
		}

void Lonly(...)
	PROTOTYPE: @
	PPCODE:
		if (items == 0)
			croak("Lonly needs >= 1 array ref");
		SP = set_multiplicity(aTHX_ SP, &ST(0), (size_t)items, 0, 0,
		                      "Lonly", GIMME_V);

void Ronly(...)
	PROTOTYPE: @
	PPCODE:
		if (items == 0)
			croak("Ronly needs >= 1 array ref");
		/*mirror of Lonly: values only in the LAST array (from_last = 1), so
		the two-array Ronly(a,b) still equals Lonly(b,a).*/
		SP = set_multiplicity(aTHX_ SP, &ST(0), (size_t)items, 0, 1,
		                      "Ronly", GIMME_V);

void is_equivalent(...)
	PROTOTYPE: @
	PPCODE:
		if (items < 2)
			croak("is_equivalent needs >= 2 array refs (got %" UVuf ")", (UV)items);
		XPUSHs(sv_2mortal(newSViv(set_equivalent(aTHX_ &ST(0), (size_t)items, "is_equivalent"))));

SV* pnorm(...)

 view all matches for this distribution


Storable-AMF

 view release on metacpan or  search on metacpan

AMF.xs  view on Meta::CPAN

MODULE = Storable::AMF0 PACKAGE = Storable::AMF0::TemporaryStorage
PROTOTYPES: DISABLE 

void
new(SV *class, SV *option=0)
    PPCODE:
    PERL_UNUSED_VAR( class );
    XPUSHs( sv_2mortal( tmpstorage_create_sv( aTHX_ NULL, option )));

void
DESTROY(SV *self)
    PPCODE:
    tmpstorage_destroy_sv( aTHX_ self );

PROTOTYPES: ENABLE

MODULE = Storable::AMF0 PACKAGE = Storable::AMF0		

AMF.xs  view on Meta::CPAN

	Storable::AMF::dclone= 1
	Storable::AMF3::dclone= 2
    PROTOTYPE: $
    INIT:
        SV* retvalue;
    PPCODE:
	PERL_UNUSED_VAR(ix);
        retvalue = deep_clone(aTHX_  data);
        sv_2mortal(retvalue);
        XPUSHs(retvalue);

AMF.xs  view on Meta::CPAN

amf_tmp_storage(...)
    INIT:
        SV * retvalue;
        SV * sv_option;
    PROTOTYPE: ;$
    PPCODE:
        if (items<0 || items > 1)
            croak("sv_option=0");
        if (items<1)
            sv_option = 0;
        else 

AMF.xs  view on Meta::CPAN

    PROTOTYPE: $;$
    INIT:
        SV* retvalue;
        SV* sv_option;
        struct io_struct *io;
    PPCODE:
	PERL_UNUSED_VAR(ix);
        check_bounds(1,2, "sv_option=0");
        if ( items == 1 )
            sv_option = 0;
        else 

AMF.xs  view on Meta::CPAN

	Storable::AMF::deparse_amf0=2
    INIT:
        SV* retvalue;
        SV* sv_option;
	struct io_struct *io;
    PPCODE:
        check_bounds(1,2, "sv_option=0");
        if ( items == 1 )
            sv_option = 0;
        else 
            sv_option = ST(1);

AMF.xs  view on Meta::CPAN

    PROTOTYPE: $;$
    INIT:
        SV * retvalue;
        SV * sv_option;
        struct io_struct *io;
    PPCODE:
        check_bounds(1,2, "sv_option=0");
        if ( items == 1 )
            sv_option = 0;
        else 
            sv_option = ST(1);

AMF.xs  view on Meta::CPAN

    PROTOTYPE: $;$
    INIT:
        SV* retvalue;
        SV* sv_option = 0;
        struct io_struct *io;
    PPCODE:
        check_bounds(1,2, "sv_option=0");
        if ( items == 1 )
            sv_option = 0;
        else 
            sv_option = ST(1);

AMF.xs  view on Meta::CPAN

        SV* retvalue;
        SV *sv_option = 0;
        struct io_struct *io;
    ALIAS:
	Storable::AMF::thaw3=1
    PPCODE:
        check_bounds(1,2, "sv_option=0");
        if ( items == 1 )
            sv_option = 0;
        else 
            sv_option = ST(1);

AMF.xs  view on Meta::CPAN

_test_thaw_integer(SV*data)
    PROTOTYPE: $
    INIT:
        SV* retvalue;
        struct io_struct *io;
    PPCODE:
        io = tmpstorage_create_and_cache(aTHX_ cv );
        if ( ! Sigsetjmp(io->target_error, 0)){
            io->subname = "Storable::AMF3::_test_thaw_integer( data, option )";
            io_in_init(aTHX_  io, data, AMF3_VERSION, 0 );
            retvalue = (SV*) (amf3_parse_integer(aTHX_  io));

AMF.xs  view on Meta::CPAN

_test_freeze_integer(SV*data)
    PROTOTYPE: $
    PREINIT:
        SV * retvalue;
        struct io_struct *io;
    PPCODE:
        io = tmpstorage_create_and_cache(aTHX_ cv );
        if (! Sigsetjmp(io->target_error, 0)){
            io_out_init(aTHX_  io, 0, AMF3_VERSION);
            amf3_write_integer(aTHX_  io, SvIV(data));
            retvalue = io_buffer(io);

AMF.xs  view on Meta::CPAN

void 
endian()
    PROTOTYPE:
    PREINIT:
        SV * retvalue;
    PPCODE:
    retvalue = newSVpvf("%s %x\n",GAX, BYTEORDER);
    sv_2mortal(retvalue);
    XPUSHs(retvalue);

void freeze(SV *data, SV *sv_option = 0 )

AMF.xs  view on Meta::CPAN

    PREINIT:
        SV * retvalue;
        struct io_struct *io;
    ALIAS:
	Storable::AMF::freeze3=1
    PPCODE:
	PERL_UNUSED_VAR(ix); 
        io = tmpstorage_create_and_cache(aTHX_ cv );
        if (! Sigsetjmp(io->target_error, 0)){
            io_out_init(aTHX_  io, sv_option, AMF3_VERSION);
            amf3_format_one(aTHX_  io, data);

AMF.xs  view on Meta::CPAN

	Storable::AMF::new_amfdate =1
	Storable::AMF0::new_amfdate=2
	Storable::AMF::new_date =3
	Storable::AMF0::new_date=4
	Storable::AMF3::new_date=5
    PPCODE:
	PERL_UNUSED_VAR( ix );
	mortal=sv_newmortal();
	sv_setref_nv( mortal, "*", timestamp ); /*Stupid but it works */
	XPUSHs( mortal );

AMF.xs  view on Meta::CPAN

    SV *mortal;
    PROTOTYPE: $
    ALIAS: 
	Storable::AMF::perl_date=1
	Storable::AMF0::perl_date=2
    PPCODE:
	PERL_UNUSED_VAR( ix );
	if ( SvROK( date ) && util_is_date( (SV*) SvRV(date))){
	    XPUSHs((SV*) SvRV(date));
	}
	else if ( SvNOK( date )){

AMF.xs  view on Meta::CPAN

    Storable::AMF::parse_option=1
    Storable::AMF0::parse_option=2
    Storable::AMF::parse_serializator_option=3
    Storable::AMF3::parse_serializator_option=4
    Storable::AMF0::parse_serializator_option=5
    PPCODE:
    PERL_UNUSED_VAR( ix );
    s_strict = 0;
    s_utf8_decode = 0;
    s_utf8_encode = 0;
    s_milldate    = 0;

AMF.xs  view on Meta::CPAN

MODULE = Storable::AMF0 PACKAGE = Storable::AMF::Util

void
total_sv()
    PROTOTYPE: 
    PPCODE:
    I32 visited  = 0;
    SV* sva;
    for( sva = PL_sv_arenaroot; sva; sva = (SV*)SvANY(sva)) {
        SV * svend = &sva[SvREFCNT(sva)];
        SV * svi;

AMF.xs  view on Meta::CPAN

    PROTOTYPE: $$;$
    INIT: 
        SV * retvalue;
        SV *sv_option;
        struct io_struct *io;
    PPCODE:
        check_bounds(2,3, "sv_option=0");
        if ( items == 2 )
            sv_option = 0;
        else 
            sv_option = ST(2);

 view all matches for this distribution


Storable

 view release on metacpan or  search on metacpan

Storable.xs  view on Meta::CPAN

pstore(f,obj)
    OutputStream f
    SV*         obj
ALIAS:
    net_pstore = 1
PPCODE:
    RETVAL = do_store(aTHX_ f, obj, 0, ix, (SV **)0) ? &PL_sv_yes : &PL_sv_undef;
    /* do_store() can reallocate the stack, so need a sequence point to ensure
       that ST(0) knows about it. Hence using two statements.  */
    ST(0) = RETVAL;
    XSRETURN(1);

 view all matches for this distribution


String-Approx

 view release on metacpan or  search on metacpan

Approx.xs  view on Meta::CPAN

        apse_t*         ap
        SV*             text
    PREINIT:
        apse_size_t     match_begin;
        apse_size_t     match_size;
    PPCODE:
	if (ap->use_minimal_distance) {
	  apse_slice(ap,
		     (unsigned char *)SvPV(text, PL_na),
		     (apse_size_t)sv_len(text),
		     &match_begin,

Approx.xs  view on Meta::CPAN

        apse_t*         ap
        SV*             text
    PREINIT:
        apse_size_t     match_begin;
        apse_size_t     match_size;
    PPCODE:
        if (apse_slice_next(ap,
                            (unsigned char *)SvPV(text, PL_na),
                            sv_len(text),
                            &match_begin,
                            &match_size)) {

 view all matches for this distribution


( run in 1.358 second using v1.01-cache-2.11-cpan-4e7a2411597 )