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


Math-Random-BlumBlumShub

 view release on metacpan or  search on metacpan

BlumBlumShub.xs  view on Meta::CPAN

	mpz_t *	q
	mpz_t *	seed
	int	bits_required
        PREINIT:
        I32* temp;
        PPCODE:
        temp = PL_markstack_ptr++;
        bbs(outref, p, q, seed, bits_required);
        if (PL_markstack_ptr != temp) {
          /* truly void, because dXSARGS not invoked */
          PL_markstack_ptr = temp;

BlumBlumShub.xs  view on Meta::CPAN

	mpz_t *	seed
	mpz_t *	p
	mpz_t *	q
        PREINIT:
        I32* temp;
        PPCODE:
        temp = PL_markstack_ptr++;
        bbs_seedgen(seed, p, q);
        if (PL_markstack_ptr != temp) {
          /* truly void, because dXSARGS not invoked */
          PL_markstack_ptr = temp;

BlumBlumShub.xs  view on Meta::CPAN

autocorrelation (bitstream, offset)
	mpz_t *	bitstream
	int	offset
        PREINIT:
        I32* temp;
        PPCODE:
        temp = PL_markstack_ptr++;
        autocorrelation(aTHX_ bitstream, offset);
        if (PL_markstack_ptr != temp) {
          /* truly void, because dXSARGS not invoked */
          PL_markstack_ptr = temp;

 view all matches for this distribution


Math-Random-Brownian

 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


Math-Random-MTwist

 view release on metacpan or  search on metacpan

MTwist.xs  view on Meta::CPAN

  OUTPUT:
    RETVAL

void
DESTROY(mt_state* state)
  PPCODE:
    Safefree(state);

UV
seed32(mt_state* state, uint32_t seed)
  CODE:

MTwist.xs  view on Meta::CPAN

void
bestseed(mt_state* state)

void
_bestseed()
  PPCODE:
    bestseed(NULL);

void
seedfull(mt_state* state, AV* seeds)
  PPCODE:
    seedfull(state, seeds);

void
_seedfull(AV* seeds)
  PPCODE:
    seedfull(NULL, seeds);

SV*
irand32(mt_state* state);
  ALIAS:

MTwist.xs  view on Meta::CPAN


void
rd_double(mt_state* state, int index = 0)
  PREINIT:
    int2dbl i2d;
  PPCODE:
    i2d = rd_double(state);
    RETURN_I2D(items > 1);

void
_rd_double(int index = 0)
  PREINIT:
    int2dbl i2d;
  PPCODE:
    i2d = rd_double(NULL);
    RETURN_I2D(items != 0);

IV
rd_iuniform32(mt_state* state, IV lower, IV upper);

MTwist.xs  view on Meta::CPAN

  OUTPUT:
    RETVAL

void
setstate(mt_state* state, SV* sv_state)
  PPCODE:
    set_state_from_sv(sv_state, state);

void
_setstate(SV* sv_state)
  PPCODE:
    set_state_from_sv(sv_state, &mt_default_state);

BOOT:
{
  HV *stash;

 view all matches for this distribution


Math-Random-MicaliSchnorr

 view release on metacpan or  search on metacpan

MicaliSchnorr.xs  view on Meta::CPAN

	SV *	exp
	mpz_t *	p
	mpz_t *	q
        PREINIT:
        I32* temp;
        PPCODE:
        temp = PL_markstack_ptr++;
        ms_seedgen(aTHX_ seed, exp, p, q);
        if (PL_markstack_ptr != temp) {
          /* truly void, because dXSARGS not invoked */
          PL_markstack_ptr = temp;

MicaliSchnorr.xs  view on Meta::CPAN

	mpz_t *	seed
	SV *	exp
	int	bits_required
        PREINIT:
        I32* temp;
        PPCODE:
        temp = PL_markstack_ptr++;
        ms(aTHX_ outref, p, q, seed, exp, bits_required);
        if (PL_markstack_ptr != temp) {
          /* truly void, because dXSARGS not invoked */
          PL_markstack_ptr = temp;

MicaliSchnorr.xs  view on Meta::CPAN

autocorrelation (bitstream, offset)
	mpz_t *	bitstream
	int	offset
        PREINIT:
        I32* temp;
        PPCODE:
        temp = PL_markstack_ptr++;
        autocorrelation(aTHX_ bitstream, offset);
        if (PL_markstack_ptr != temp) {
          /* truly void, because dXSARGS not invoked */
          PL_markstack_ptr = temp;

 view all matches for this distribution


Math-Random-PCG32

 view release on metacpan or  search on metacpan

lib/Math/Random/PCG32.xs  view on Meta::CPAN


void
irand_way(pcg32_random_t *rng, int32_t x1, int32_t y1, int32_t x2, int32_t y2)
    PREINIT:
        int32_t dx, dy, magx;
    PPCODE:
        if (x1 == x2 && y1 == y2) XSRETURN_UNDEF;
        EXTEND(SP, 2);
        dx = x2 - x1;
        dy = y2 - y1;
        if (dx == 0)      goto MOVE_Y;

lib/Math/Random/PCG32.xs  view on Meta::CPAN

    AV *avref;
    PREINIT:
        AV* smpl;
        SSize_t len, i;
        uint32_t total;
    PPCODE:
        smpl = newAV();
        len = av_len(avref) + 1;
        if (len == 0 || count == 0) goto DONE;
        if (count >= len) {
            av_extend(smpl, len - 1);

lib/Math/Random/PCG32.xs  view on Meta::CPAN

        ST(0) = sv_2mortal( newRV_inc((SV *) smpl) );
        XSRETURN(1);

void
DESTROY(pcg32_random_t *rng)
    PPCODE:
        Safefree(rng);

 view all matches for this distribution


Math-RngStream

 view release on metacpan or  search on metacpan

RngStream.xs  view on Meta::CPAN

void
get_state(RngStream G)
PREINIT:
    unsigned long seed[6];
    int i;
PPCODE:
    RngStream_GetState(G, seed);
    EXTEND(SP, 6);
    for (i = 0; i++; i < 6)
        PUSHs(sv_2mortal(newSVuv(seed[i])));
    XSRETURN(6);

 view all matches for this distribution


Math-SO3

 view release on metacpan or  search on metacpan

SO3.xs  view on Meta::CPAN

#   XXX have to put a bit more thought into this. Does it really work that way,
#   or did I still miss a point?

void
turning_angle_and_dir(...)
	PPCODE:
	{
          double angle, *dir, v2[3], v3[3], norm;
          char *cdir;

	  if(   (items!=1 && items != 2)

SO3.xs  view on Meta::CPAN

#     otherwise use [2][0] and [2][1] elements.


void
euler_angles_zxz(...)
	PPCODE:
         {
	  if(   (items!=1 && items!=2)
             || SvTYPE(SvRV(ST(0)))!=SVt_PVMG)
          {
             croak(croak_euler_angles_zxz);

SO3.xs  view on Meta::CPAN

#
# => heading=0, roll=atan2(sin_roll, cos_roll)

void 
euler_angles_yxz(...)
	PPCODE:
	{
          int i;
          double heading, pitch, roll, cos_heading, cos_pitch, cos_roll, sin_heading, sin_pitch, sin_roll;
          Math__SO3 so3;

 view all matches for this distribution


Math-SimpleHisto-XS

 view release on metacpan or  search on metacpan

XS.xs  view on Meta::CPAN

void
all_bin_contents(self)
    simple_histo_1d* self
  PREINIT:
    SV* rv;
  PPCODE:
    rv = histo_data_av(aTHX_ self);
    XPUSHs(sv_2mortal(rv));

void
set_all_bin_contents(self, new_data)

XS.xs  view on Meta::CPAN

void
set_bin_content(self, ibin, content)
    simple_histo_1d* self
    unsigned int ibin
    double content
  PPCODE:
    /* Would be nicer in the API, but again, this is faster. */
    HS_ASSERT_BIN_RANGE(self, ibin);
    HS_INVALIDATE_CUMULATIVE(self);
    self->total += content - self->data[ibin];
    self->data[ibin] = content;

void
set_underflow(self, content)
    simple_histo_1d* self
    double content
  PPCODE:
    /* This doesn't invalidate the INTERNAL cumulative histo */
    self->underflow = content;

void
set_overflow(self, content)
    simple_histo_1d* self
    double content
  PPCODE:
    /* This doesn't invalidate the INTERNAL cumulative histo */
    self->overflow = content;


void
set_nfills(self, nfills)
    simple_histo_1d* self
    unsigned int nfills
  PPCODE:
    /* This doesn't invalidate the INTERNAL cumulative histo */
    self->nfills = nfills;


#void

XS.xs  view on Meta::CPAN

#  PREINIT:
#    char* out;
#    SV* outSv;
#    double* tmp;
#    unsigned int size;
#  PPCODE:
#    size = sizeof(simple_histo_1d) + sizeof(double)*self->nbins;
#    outSv = newSVpvs("");
#    SvGROW(outSv, size+1);
#    printf("   %u\n", SvLEN(outSv));
#    out = SvPVX(outSv);

XS.xs  view on Meta::CPAN

    SV* rngsv;
    Math__SimpleHisto__XS__RNG rng;
    unsigned int ibin;
  PREINIT:
    simple_histo_1d* cum_hist;
  PPCODE:
    if (items > 1) {
      rngsv = ST(1);
    }
    else {
      rngsv = get_sv("Math::SimpleHisto::XS::RNG::Gen", 0);

XS.xs  view on Meta::CPAN

_get_info(self)
    simple_histo_1d* self
  PREINIT:
    SV* data_ary;
    SV* bins_ary;
  PPCODE:
    /* min, max, nbins, nfills, overflow, underflow, dataref, binsref*/
    EXTEND(SP, 8);
    mPUSHn(self->min);
    mPUSHn(self->max);
    mPUSHu(self->nbins);

 view all matches for this distribution


Math-String-Charset-Wordlist

 view release on metacpan or  search on metacpan

Wordlist.xs  view on Meta::CPAN

	long buffer[BUFFER_SIZE];
	unsigned char read_buffer[READ_BUFFER_SIZE];
	long buffered, idx, base, ofs;
        size_t read;

  PPCODE:
    name = SvPVX(n);				/* get ptr to storage */

    len = sizeof (struct Offsets);
    ST(0) = newSV(len);		/* alloc enough to store one ptr */
    SvPOK_on(ST(0));

Wordlist.xs  view on Meta::CPAN

_records(ptr)
  SV*	ptr

  INIT:
	struct Offsets* offset;
  PPCODE:
    offset = (struct Offsets*) SvPVX(ptr);	/* get ptr to storage */
    ST(0) = sv_2mortal( newSVnv( offset->max_offsets ));
    XSRETURN(1);

##############################################################################

Wordlist.xs  view on Meta::CPAN

  SV*	ptr
  SV*	n
  INIT:
	long N;
	struct Offsets* offset;
  PPCODE:
    N = SvNV(n);

    offset = (struct Offsets*) SvPVX(ptr);	/* get ptr to storage */

    /* offset exists? */

Wordlist.xs  view on Meta::CPAN

	unsigned int N;
	unsigned int ofs,len;
	char* buf;
	struct Offsets* offset;

  PPCODE:
    N = (int)SvNV(n);

    offset = (struct Offsets*) SvPVX(ptr);	/* get ptr to storage */

    if (offset == NULL)

 view all matches for this distribution


Math-TamuAnova

 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


Math-Vector-Real-XS

 view release on metacpan or  search on metacpan

XS.xs  view on Meta::CPAN

    mvr v0
    mvr v1
    SV *rev = NO_INIT
PREINIT:
    I32 len, i;
PPCODE:
    len = mvr_len(aTHX_ v0);
    mvr_check_len(aTHX_ v1, len);
    mvr_add_me(aTHX_ v0, v1, len);
    XSRETURN(1);

XS.xs  view on Meta::CPAN

    mvr v0
    mvr v1
    SV *rev = NO_INIT
PREINIT:
    I32 len, i;
PPCODE:
    len = mvr_len(aTHX_ v0);
    mvr_check_len(aTHX_ v1, len);
    mvr_subtract_me(aTHX_ v0, v1, len);
    XSRETURN(1);

XS.xs  view on Meta::CPAN

    SV *sv1
    SV *rev = NO_INIT
PREINIT:
    I32 len, i;
    mvr v1;
PPCODE:
    /* fprintf(stderr, "using mul operator from XS\n"); fflush(stderr); */
    len = mvr_len(aTHX_ v0);
    if (SvROK(sv1) && (SvTYPE(v1 = (AV*)SvRV(sv1)) == SVt_PVAV)) {
        NV acu = 0;
        mvr_check_len(aTHX_ v1, len);

XS.xs  view on Meta::CPAN

    SV *sv1
    SV *rev = NO_INIT
PREINIT:
    int len, i;
    NV nv1;
PPCODE:
    if (SvROK(sv1) && (SvTYPE(SvRV(sv1)) == SVt_PVAV))
        Perl_croak(aTHX_ "can not multiply by a vector in place as the result is not a vector");
    nv1 = SvNV(sv1);
    len = mvr_len(aTHX_ v0);
    for (i = 0; i <= len; i++) {

XS.xs  view on Meta::CPAN

    RETVAL

void
box(klass, ...)
    SV *klass = NO_INIT
PPCODE:
    if (items <= 1) XSRETURN(0);
    else {
        I32 len, j;
        mvr min, max;
        mvr v = mvr_from_sv(aTHX_ ST(1));

XS.xs  view on Meta::CPAN

    mvr v1
PREINIT:
    I32 len, i;
    mvr p, n;
    NV f, nr;
PPCODE:
    len = mvr_len(aTHX_ v0);
    mvr_check_len(aTHX_ v1, len);
    nr = mvr_norm(aTHX_ v0, len);
    if (nr == 0) Perl_croak(aTHX_ "Illegal division by zero");
    p = mvr_new(aTHX_ len);

XS.xs  view on Meta::CPAN

canonical_base(klass, dim)
    SV *klass = NO_INIT
    I32 dim
PREINIT:
    I32 j;
PPCODE:
    if (dim <= 0) Perl_croak(aTHX_ "negative dimension");
    EXTEND(SP, dim);
    for (j = 0; j < dim; j++) {
        mvr v = mvr_new(aTHX_ dim - 1);
        ST(j) = sv_newmortal();

XS.xs  view on Meta::CPAN

    mvr dir
PREINIT:
    I32 len, i;
    mvr u, v, w;
    NV n;
PPCODE:
    len = mvr_len(aTHX_ dir);
    if (len != 2) Perl_croak(aTHX_ "rotation_base_3d requires a 3D vector");
    n = mvr_norm(aTHX_ dir, len);
    if (n == 0) Perl_croak(aTHX_ "Illegal division by zero");
    EXTEND(SP, 3);

XS.xs  view on Meta::CPAN

    mvr v
    NV r
PREINIT:
    I32 len, i, to;
    NV r2;
PPCODE:
    len = mvr_len(aTHX_ v);
    r2 = r * r;
    for (to = 0, i = 2; i < items; i++) {
        mvr e = mvr_from_sv(aTHX_ ST(i));
        mvr_check_len(aTHX_ e, len);

 view all matches for this distribution


Math-decNumber

 view release on metacpan or  search on metacpan

decNumber.xs  view on Meta::CPAN


#============| Destructor
void
decNumberDESTROY( number )
  decNumber * number
  PPCODE:
    // fprintf( stderr, "***> DESTROY %x\n", number);
    DECNUM_FREE(number);


MODULE = Math::decNumber    PACKAGE = Math::decNumber   PREFIX = decNumber

 view all matches for this distribution


Math-ematica

 view release on metacpan or  search on metacpan

ematica.xs  view on Meta::CPAN

	MLINK	link
PREINIT:
	char *    name;
	long_st   nargs;
        SV *      symbol;
PPCODE:
        if (!MLGetFunction(link, (kcharpp_ct) &name, &nargs)) {
          XSRETURN_UNDEF;
        }
        symbol = make_symbol(name);
        MLDisownSymbol(link, name);

ematica.xs  view on Meta::CPAN

	MLINK	link
PREINIT:
	doublep_nt	array;
	long_st         len;
        long_st         i;
PPCODE:
        if (!MLGetRealList(link, &array, &len)) {
          XSRETURN_UNDEF;
        }
        EXTEND(sp, len);
        for (i=0;i<len;i++) {

ematica.xs  view on Meta::CPAN

        XSRETURN(len);

void
symbol(name)
	SV *	name
PPCODE:
        ST(0) = sv_2mortal(newRV_noinc(newSVsv(name)));
        sv_bless(ST(0), gv_stashpv(SYMNAME,1));
	XSRETURN(1);

mlapi_result

 view all matches for this distribution


MaxMind-DB-Reader-XS

 view release on metacpan or  search on metacpan

lib/MaxMind/DB/Reader/XS.xs  view on Meta::CPAN

        MMDB_s *mmdb
        U32 node_number
    PREINIT:
        MMDB_search_node_s node;
        int status;
    PPCODE:
        status = MMDB_read_node(mmdb, node_number, &node);
        if (MMDB_SUCCESS != status) {
            const char *error = MMDB_strerror(status);
            croak(
                "MaxMind::DB::Reader::XS - Error trying to read node %i: %s",

 view all matches for this distribution


Media-LibMTP-API

 view release on metacpan or  search on metacpan

lib/Media/LibMTP/API.xs  view on Meta::CPAN

void
_devices(self)
	MLA_RawDeviceList	self
   PREINIT:
	int i;
   PPCODE:
	EXTEND(SP, self->numdevs);
	for (i = 0; i < self->numdevs; ++i) {
	  SV* sv = sv_newmortal();
	  sv_setref_pv(sv, "Media::LibMTP::API::RawDevice",
		       (void*)(self->devices + i));

 view all matches for this distribution


Medusa-XS

 view release on metacpan or  search on metacpan

lib/Medusa/XS.xs  view on Meta::CPAN

        const char *method;
        STRLEN method_len;
        const char *pkg;
        STRLEN pkg_len;
        GV *gv;
    PPCODE:
        /* Get the CV from the coderef */
        if (!SvROK(coderef) || SvTYPE(SvRV(coderef)) != SVt_PVCV) {
            croak("wrap_sub: argument must be a code reference");
        }
        cv = (CV *)SvRV(coderef);

lib/Medusa/XS.xs  view on Meta::CPAN

# XSUB: _apply_deferred_wraps - Re-install wrappers queued on 5.10    #
# ------------------------------------------------------------------ #

void
_apply_deferred_wraps()
    PPCODE:
        medusa_check_apply_wraps(aTHX_ NULL);
        XSRETURN(0);

# ------------------------------------------------------------------ #
# XSUB: log_message - Full XS logging implementation                  #

lib/Medusa/XS.xs  view on Meta::CPAN

void
log_message(...)
    PREINIT:
        HV *params;
        int i;
    PPCODE:
        /* Build params hash from @_ */
        if (items % 2 != 0) {
            croak("log_message: odd number of arguments");
        }
        params = newHV();

lib/Medusa/XS.xs  view on Meta::CPAN

void
init_logger()
    PREINIT:
        HV *log_config;
        SV **svp;
    PPCODE:
        log_config = get_hv("Medusa::XS::LOG", 0);
        if (!log_config) {
            XSRETURN(0);
        }
        

lib/Medusa/XS.xs  view on Meta::CPAN

        const char *caller_pkg;
        HV *caller_stash;
        AV *isa;
        GV *isa_gv;
        int i;
    PPCODE:
        /* Check for odd number of args (after class name) */
        if ((items - 1) % 2 != 0) {
            croak("odd number of params passed in import");
        }
        

lib/Medusa/XS.xs  view on Meta::CPAN

        const char *pkg_name;
        STRLEN pkg_len;
        HV *audited;
        int i;
        bool found_audit = FALSE;
    PPCODE:
        /* Check if any attribute is "Audit" */
        for (i = 2; i < items; i++) {
            STRLEN len;
            const char *attr = SvPV(ST(i), len);
            if (len >= 5 && strncmp(attr, "Audit", 5) == 0) {

lib/Medusa/XS.xs  view on Meta::CPAN

        SV *coderef
    PREINIT:
        CV *cv;
        HV *audited;
        bool is_audited_cv = FALSE;
    PPCODE:
        PERL_UNUSED_VAR(pkg);
        
        if (!SvROK(coderef) || SvTYPE(SvRV(coderef)) != SVt_PVCV) {
            XSRETURN(0);
        }

 view all matches for this distribution


Memcached-libmemcached

 view release on metacpan or  search on metacpan

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


  my $END = "!End!\n\n";		# "impossible" keyword (multiple newline)

  # Match an XS keyword
  $BLOCK_re= '\s*(' . join('|', qw(
				   REQUIRE BOOT CASE PREINIT INPUT INIT CODE PPCODE OUTPUT
				   CLEANUP ALIAS ATTRS PROTOTYPES PROTOTYPE VERSIONCHECK INCLUDE
				   SCOPE INTERFACE INTERFACE_MACRO C_ARGS POSTCALL OVERLOAD FALLBACK
				  )) . "|$END)\\s*:";

  

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

      s/^/&/ if $in_out{$_};
    }
    $func_args = join(", ", @func_args);
    @args_match{@args} = @args_num;

    $PPCODE = grep(/^\s*PPCODE\s*:/, @line);
    $CODE = grep(/^\s*CODE\s*:/, @line);
    # Detect CODE: blocks which use ST(n)= or XST_m*(n,v)
    #   to set explicit return values.
    $EXPLICIT_RETURN = ($CODE &&
			("@line" =~ /(\bST\s*\([^;]*=) | (\bXST_m\w+\s*\()/x ));

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

     # the if of this else
     print Q(<<"EOF");
#    PERL_UNUSED_VAR(cv); /* -W */
EOF

    #gcc -Wall: if an xsub has PPCODE is used
    #it is possible none of ST, XSRETURN or XSprePUSH macros are used
    #hence `ax' (setup by dXSARGS) is unused
    #XXX: could breakup the dXSARGS; into dSP;dMARK;dITEMS
    #but such a move could break third-party extensions
    print Q(<<"EOF") if $PPCODE;
#    PERL_UNUSED_VAR(ax); /* -Wall */
EOF

    print Q(<<"EOF") if $PPCODE;
#    SP -= items;
EOF

    # Now do a block of some sort.

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

        process_keyword("INIT|ALIAS|ATTRS|PROTOTYPE|INTERFACE_MACRO|INTERFACE|C_ARGS|OVERLOAD") ;
	
	print delete $deferred{pre_call};
	print delete $deferred{auto_length_init};

	if (check_keyword("PPCODE")) {
	  print_section();
	  death ("PPCODE must be last thing") if @line;
	  print "\tLEAVE;\n" if $ScopeThisXSUB;
	  print "\tPUTBACK;\n\treturn;\n";
	} elsif (check_keyword("CODE")) {
	  print_section() ;
	} elsif (defined($class) and $func_name eq "DESTROY") {

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

      process_keyword("CLEANUP|ALIAS|ATTRS|PROTOTYPE|OVERLOAD") ;
      
      print Q(<<"EOF") if $ScopeThisXSUB;
#   ]]
EOF
      print Q(<<"EOF") if $ScopeThisXSUB and not $PPCODE;
#   LEAVE;
EOF
      
      # print function trailer
      print Q(<<"EOF");

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

#    if (errbuf[0])
#	Perl_croak(aTHX_ errbuf);
EOF
    
    if ($xsreturn) {
      print Q(<<"EOF") unless $PPCODE;
#    XSRETURN($xsreturn);
EOF
    } else {
      print Q(<<"EOF") unless $PPCODE;
#    XSRETURN_EMPTY;
EOF
    }

    print Q(<<"EOF");

 view all matches for this distribution


Memphis

 view release on metacpan or  search on metacpan

xs/MemphisMap.xs  view on Meta::CPAN

		gdouble minlat = 0,
		        minlon = 0,
		        maxlat = 0,
		        maxlon = 0;

	PPCODE:
		memphis_map_get_bounding_box(map, &minlat, &minlon, &maxlat, &maxlon);
		EXTEND(SP, 4);
		PUSHs(sv_2mortal(newSVnv(minlat)));
		PUSHs(sv_2mortal(newSVnv(minlon)));
		PUSHs(sv_2mortal(newSVnv(maxlat)));

 view all matches for this distribution


Mesos

 view release on metacpan or  search on metacpan

xsp/ExecutorDriver.xsp  view on Meta::CPAN


%{

static void
_xs_init(SV* self, mesos::perl::MesosChannel* channel)
    PPCODE:
        if (SvROK(self) && SvTYPE(SvRV(self)) == SVt_PVHV) {
            // make sure channel ref gets incremented
            mesos::perl::ProxyExecutor* proxy = new mesos::perl::ProxyExecutor(channel->share());
            mesos::perl::ExecutorDriver* driver = new mesos::perl::ExecutorDriver(proxy);
            sv_magic(SvRV(self), Nullsv, PERL_MAGIC_ext,

 view all matches for this distribution


MicroECC

 view release on metacpan or  search on metacpan

MicroECC.xs  view on Meta::CPAN

		int pubkey_len, privkey_len;
		uint8_t *pubkey, *privkey;
		uECC_Curve curve;
		int res;

	PPCODE:
		curve = get_curve(curve_id);
		pubkey_len  = uECC_curve_public_key_size(curve);
		privkey_len = uECC_curve_private_key_size(curve);
		pubkey  = (uint8_t *)malloc(pubkey_len);
		privkey = (uint8_t *)malloc(privkey_len);

 view all matches for this distribution


Mojo-Base-XS

 view release on metacpan or  search on metacpan

XS.xs  view on Meta::CPAN

    /* Get the const hash key struct from the global storage */
    /* ix is the magic integer variable that is set by the perl guts for us.
     * We uses it to identify the currently running alias of the accessor. Gollum! */
    const autoxs_hashkey readfrom = CXSAccessor_hashkeys[ix];
    SV** svp;
PPCODE:
    CXAH_OPTIMIZE_ENTERSUB(accessor);
    ACCESSOR_BODY

void
accessor(self, ...)

XS.xs  view on Meta::CPAN

    /* Get the const hash key struct from the global storage */
    /* ix is the magic integer variable that is set by the perl guts for us.
    * We uses it to identify the currently running alias of the accessor. Gollum! */
    const autoxs_hashkey readfrom = CXSAccessor_hashkeys[ix];
    SV** svp;
PPCODE:
    ACCESSOR_BODY


void
attr(caller_obj, name, ...)

XS.xs  view on Meta::CPAN

  PREINIT:
    int iStack;
    HV* hash;
    SV* obj;
    const char* classname;
  PPCODE:
    CXAH_OPTIMIZE_ENTERSUB(constructor);
    CONSTRUCTOR_BODY


void

XS.xs  view on Meta::CPAN

  PREINIT:
    int iStack;
    HV* hash;
    SV* obj;
    const char* classname;
  PPCODE:
    CONSTRUCTOR_BODY

void
newxs_constructor(name)
  char* name;
  PPCODE:
    INSTALL_NEW_CV(name, CXAH(constructor_init));

void
newxs_attr(name)
  char* name;
  PPCODE:
    INSTALL_NEW_CV(name, CXAH(attr));

 view all matches for this distribution


MongoDB-Async

 view release on metacpan or  search on metacpan

xs/BSON.xs  view on Meta::CPAN

void
decode_bson(sv)
         SV *sv
    PREINIT:
         buffer buf;
    PPCODE:
         buf.start = SvPV_nolen(sv);
         buf.pos = buf.start;
         buf.end = buf.start + SvCUR(sv);

         while(buf.pos < buf.end) {

xs/BSON.xs  view on Meta::CPAN

void
encode_bson(obj)
         SV *obj
    PREINIT:
         buffer buf;
    PPCODE:
         CREATE_BUF(INITIAL_BUF_SIZE);
         perl_mongo_sv_to_bson(&buf, obj, NO_PREP);
         perl_mongo_serialize_size(buf.start, &buf);
         XPUSHs(sv_2mortal(newSVpvn(buf.start, buf.pos-buf.start)));
         Safefree(buf.start);

		 
void
read_flags()
    PPCODE:
	read_flags();

 view all matches for this distribution


Moose

 view release on metacpan or  search on metacpan

xs/HasMethods.xs  view on Meta::CPAN

        SV *const class_name = HeVAL( hv_fetch_ent(obj, KEY_FOR(package), 0, HASH_FOR(package)) );
        HV *const stash      = gv_stashsv(class_name, 0);
        UV current;
        SV *cache_flag;
        SV *map_ref;
    PPCODE:
        if (!stash) {
             mXPUSHs(newRV_noinc((SV *)newHV()));
             return;
        }

 view all matches for this distribution


Mouse

 view release on metacpan or  search on metacpan

xs-src/Mouse.xs  view on Meta::CPAN

}


void
linearized_isa(SV* self)
PPCODE:
{
    /* MOUSE_xc_stash() is not available because the xc system depends on
       linearized_isa() */
    HV* const stash          = mouse_get_namespace(aTHX_ self);
    AV* const linearized_isa = mro_get_linear_isa(stash);

xs-src/Mouse.xs  view on Meta::CPAN

    }
}

void
get_all_attributes(SV* self)
PPCODE:
{
    AV* const xc        = mouse_get_xc(aTHX_ self);
    AV* const all_attrs = MOUSE_xc_attrall(xc);
    I32 const len       = AvFILLp(all_attrs) + 1;
    I32 i;

xs-src/Mouse.xs  view on Meta::CPAN

get_before_modifiers(SV* self, SV* name)
ALIAS:
    get_before_method_modifiers = MOUSE_M_BEFORE
    get_around_method_modifiers = MOUSE_M_AROUND
    get_after_method_modifiers  = MOUSE_M_AFTER
PPCODE:
{
    AV* const storage = mouse_get_modifier_storage(aTHX_ self,
                            (enum mouse_modifier_t)ix, name);
    I32 const len     = av_len(storage) + 1;
    if(GIMME_V == G_ARRAY) {

 view all matches for this distribution


Mozilla-nsID

 view release on metacpan or  search on metacpan

nsID.xs  view on Meta::CPAN


void m3(SV *obj)
	INIT:
		nsID *id;
		int i;
	PPCODE:
		id = (nsID *) SvIV(SvRV(obj));
		for (i = 0; i < sizeof(id->m3); i++) {
			XPUSHs(sv_2mortal(newSVnv(id->m3[i])));
		}

 view all matches for this distribution


MsgPack-Raw

 view release on metacpan or  search on metacpan

xs/Unpacker.xs  view on Meta::CPAN


	PREINIT:
		msgpack_unpacked u;
		msgpack_unpack_return ret;

	PPCODE:
		msgpack_unpacked_init (&u);
		ret = msgpack_unpacker_next (&self->unpacker, &u);
		switch (ret)
		{
			case MSGPACK_UNPACK_SUCCESS:

 view all matches for this distribution


Msql-Mysql-modules

 view release on metacpan or  search on metacpan

dbd/dbd.xs.in  view on Meta::CPAN

void
_ListDBs(drh, host, port=NULL)
    SV *        drh
    char *	host
    char *      port
  PPCODE:
{
#if defined(DBD_MYSQL)
    MYSQL mysql;
    dbh_t sock = &mysql;
#elif defined(DBD_MSQL)

dbd/dbd.xs.in  view on Meta::CPAN

    char* dbname
    char* host
    char* port
    char* user
    char* password
  PPCODE:
    {
        dbh_t sock;
	int result;
#if defined(DBD_MYSQL)
	MYSQL mysql;

dbd/dbd.xs.in  view on Meta::CPAN



void
type_info_all(dbh)
    SV* dbh
  PPCODE:
    {
/* 	static AV* types = NULL; */
/* 	if (!types) { */
/* 	    D_imp_dbh(dbh); */
/* 	    if (!(types = dbd_db_type_info_all(dbh, imp_dbh))) { */

dbd/dbd.xs.in  view on Meta::CPAN

#endif

void
_ListDBs(dbh)
    SV*	dbh
  PPCODE:
    D_imp_dbh(dbh);
    result_t res;
    row_t cur;
    res = MyListDbs(imp_dbh->svsock);
    if (!res  &&  (!MyReconnect(imp_dbh->svsock, dbh)

dbd/dbd.xs.in  view on Meta::CPAN



void
_ListTables(dbh)
    SV *	dbh
    PPCODE:
    D_imp_dbh(dbh);
    result_t res;
    row_t cur;
    res = MyListTables(imp_dbh->svsock);
    if (!res  &&  (!MyReconnect(imp_dbh->svsock, dbh)

dbd/dbd.xs.in  view on Meta::CPAN

quote(dbh, str, type=NULL)
    SV* dbh
    SV* str
    SV* type
  PROTOTYPE: $$;$
  PPCODE:
    {
        SV* quoted = dbd_db_quote(dbh, str, type);
	ST(0) = quoted ? sv_2mortal(quoted) : str;
	XSRETURN(1);
    }

dbd/dbd.xs.in  view on Meta::CPAN

void
getsequenceinfo(dbh, table)
    SV* dbh
    char* table
  PROTOTYPE: $$
  PPCODE:
  {
    m_seq* seq;
    D_imp_dbh(dbh);
    seq = msqlGetSequenceInfo(imp_dbh->svsock, table);
    if (!seq) {

 view all matches for this distribution


MtCmd

 view release on metacpan or  search on metacpan

MtCmd.xs  view on Meta::CPAN

  OUTPUT:
	RETVAL

int
exec(...)
  PPCODE:
	int gimme = GIMME_V;
	int debug = 0;
	int is_object;
	SV* sv;
	HV* myhash;

 view all matches for this distribution


MySQL-Dump-Parser-XS

 view release on metacpan or  search on metacpan

lib/MySQL/Dump/Parser/XS.xs  view on Meta::CPAN


PROTOTYPES: DISABLE

void
new(...)
PPCODE:
{
  if (items != 1) {
    croak("Invalid argument count: %d", items);
  }
  const char *klass = SvPV_nolen(ST(0));

lib/MySQL/Dump/Parser/XS.xs  view on Meta::CPAN

  XSRETURN(1);
}

void
reset(...)
PPCODE:
{
  if (items != 1) {
    croak("Invalid argument count: %d", items);
  }
  HV* state = (HV*)SvRV(ST(0));

lib/MySQL/Dump/Parser/XS.xs  view on Meta::CPAN

  XSRETURN(0);
}

void
parse(...)
PPCODE:
{
  if (items != 2) {
    croak("Invalid argument count: %d", items);
  }
  HV* state = (HV*)SvRV(ST(0));

lib/MySQL/Dump/Parser/XS.xs  view on Meta::CPAN

  XSRETURN(size);
}

void
current_target_table(...)
PPCODE:
{
  if (items != 1) {
    croak("Invalid argument count: %d", items);
  }
  HV* state = (HV*)SvRV(ST(0));

lib/MySQL/Dump/Parser/XS.xs  view on Meta::CPAN

  XSRETURN(1);
}

void
columns(...)
PPCODE:
{
  if (items != 2) {
    croak("Invalid argument count: %d", items);
  }
  HV* state = (HV*)SvRV(ST(0));

lib/MySQL/Dump/Parser/XS.xs  view on Meta::CPAN

  XSRETURN(size);
}

void
tables(...)
PPCODE:
{
  if (items != 1) {
    croak("Invalid argument count: %d", items);
  }

 view all matches for this distribution


NIS

 view release on metacpan or  search on metacpan

NIS.xs  view on Meta::CPAN

yp_unbind(domain)
  char *	domain

void
yp_get_default_domain()
  PPCODE:
  {
    char	*domain;
    int		status;

    status = yp_get_default_domain(&domain);

NIS.xs  view on Meta::CPAN

void
yp_match(domain, map, key)
  char *	domain
  char *	map
  SV *		key
  PPCODE:
  {
    char	*inkey;
    STRLEN	inkeylen;
    char	*outval;
    int		outvallen;

NIS.xs  view on Meta::CPAN


void
yp_first(domain, map)
  char *	domain
  char *	map
  PPCODE:
  {
    char	*outkey;
    int		outkeylen;
    char	*outval;
    int		outvallen;

NIS.xs  view on Meta::CPAN

void
yp_next(domain, map, key)
  char *	domain
  char *	map
  SV *		key
  PPCODE:
  {
    char	*inkey;
    STRLEN	inkeylen;
    char	*outkey;
    int 	outkeylen;

NIS.xs  view on Meta::CPAN


void
yp_all(domain, map)
  char *	domain
  char *	map
  PPCODE:
  {
    struct ypall_callback	callback;
    struct callbackdata		data;
    int				status;

NIS.xs  view on Meta::CPAN


void
yp_order(domain, map)
  char *	domain
  char *	map
  PPCODE:
  {
    unsigned long	order;
    int			status;

    status = yp_order(domain, map, &order);

NIS.xs  view on Meta::CPAN


void
yp_master(domain, map)
  char *	domain
  char *	map
  PPCODE:
  {
    char	*name;
    int		status;

    status = yp_master(domain, map, &name);

 view all matches for this distribution


( run in 2.018 seconds using v1.01-cache-2.11-cpan-71847e10f99 )