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


Device-Chip-Adapter-Gpiod

 view release on metacpan or  search on metacpan

lib/Device/Chip/Adapter/Gpiod.xs  view on Meta::CPAN

    RETVAL

void
gpiod_read_lines(chip_ptr, ...)
    SV *chip_ptr
  PPCODE:
    struct gpiod_chip *chip = (struct gpiod_chip*)SvIV(chip_ptr);
    int *values;
    unsigned int *offsets;
    int num_lines = items - 1;
    struct gpiod_line_bulk lines;

lib/Device/Chip/Adapter/Gpiod.xs  view on Meta::CPAN

    Safefree(offsets);

void
gpiod_write_lines(chip_ptr, ...)
    SV *chip_ptr
  PPCODE:
    struct gpiod_chip *chip = (struct gpiod_chip*)SvIV(chip_ptr);
    int *values;
    unsigned int *offsets;
    int num_lines = (items - 1) / 2;
    struct gpiod_line_bulk lines;

 view all matches for this distribution


Device-Chip-SSD1306

 view release on metacpan or  search on metacpan

lib/Device/Chip/SSD1306.xs  view on Meta::CPAN

  OUTPUT:
    RETVAL

void
_framebuffer_dirty_xlohi(SV *fbsv)
  PPCODE:
    struct SSD1306FrameBuffer *fb = INT2PTR(struct SSD1306FrameBuffer *, SvUV(fbsv));

    EXTEND(SP, 2);
    mPUSHi(fb->dirty_xlo);
    mPUSHi(fb->dirty_xhi);

 view all matches for this distribution


Device-DSE-Q1573

 view release on metacpan or  search on metacpan

Q1573.xs  view on Meta::CPAN

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

 view all matches for this distribution


Device-FTDI

 view release on metacpan or  search on metacpan

FTDI.xs  view on Meta::CPAN

    INIT:
        struct device_strings *devs, *curdev;
	char *error_str = NULL;
	HV *dev_descr;
	SV *descr_ref;
    PPCODE:
        devs = _dftdi_get_device_strings(vendor, product, &error_str);
	if (devs == NULL && error_str != NULL) {
	    croak("Failed to get list of devices: %s", error_str);
	}
	curdev = devs;

 view all matches for this distribution


Device-LaCrosse-WS23xx

 view release on metacpan or  search on metacpan

WS23xx.xs  view on Meta::CPAN

	char *     path
    INIT:
	int fh;
	struct termios adtio;
	int portstatus, fdflags;
    PPCODE:
	//Setup serial port
	if ((fh = open(path, O_RDWR | O_NONBLOCK | O_SYNC)) < 0)
	{
//	    fprintf(stderr,"\nUnable to open serial device %s\n", path);
	    XSRETURN_UNDEF;

WS23xx.xs  view on Meta::CPAN

	int fh
	unsigned short addr
	unsigned char nybble_count
    PREINIT:
	uchar buf[40];
    PPCODE:
#if	DEBUG
	printf("got here: fh=%d addr=%04X nybbles=%d\n",fh,addr,nybble_count);
#endif
	if (read_safe(fh, addr, (nybble_count+1)/2, buf)) {
	    int i;

 view all matches for this distribution


Device-LabJack

 view release on metacpan or  search on metacpan

LabJack.xs  view on Meta::CPAN

        // Make sure there's a gain for every channel
        if(numgains<numchannels) {
            XSRETURN_UNDEF;
        }

    PPCODE:

        // Extract the channels we got from perl...
        for (n = 0; n <= numchannels; n++) {
                lchannels[n]= SvNV(*av_fetch((AV *)SvRV(channels), n, 0));
        }

LabJack.xs  view on Meta::CPAN

        long errorcode=0;
//        int lstateD=0;
//        int lstateIO=0;


    PPCODE:

        // Run the command
        // errorcode = AISample (&idnum,demo,&stateIO,updateIO,ledOn,numCh,lchannels,lgains,disableCal,&ov,voltages);

        errorcode = AOUpdate (&idnum,demo,trisD,trisIO,&stateD,&stateIO,updateDigital,resetCounter,&count,analogOut0,analogOut1);

LabJack.xs  view on Meta::CPAN

        if(numgains<numchannels) {
            XSRETURN_UNDEF;
        }


    PPCODE:

        // Extract the channels we got from perl...
        for (n = 0; n <= numchannels; n++) {
                lchannels[n]= SvNV(*av_fetch((AV *)SvRV(channels), n, 0));
        }

LabJack.xs  view on Meta::CPAN

  INIT:
        long  overVoltage;
        float voltage;
        long  errcode;

  PPCODE:
        errcode = EAnalogIn(&idnum, demo, channel, gain, &overVoltage, &voltage);

        // Return the results to perl in a big array
        if(errcode) {                                   // RETVAL
          char errorString[51];

LabJack.xs  view on Meta::CPAN

        float  analogOut0
        float  analogOut1
  INIT:
        long errcode;

  PPCODE:
        errcode = EAnalogOut(&idnum, demo, analogOut0, analogOut1);

        // Return the results to perl in a big array
        if(errcode) {                                   // RETVAL
          char errorString[51];

LabJack.xs  view on Meta::CPAN


  INIT:
        long   errcode;
        double count;
        double ms;
  PPCODE:
        errcode = ECount(&idnum, demo, resetCounter, &count, &ms);


        // Return the results to perl in a big array
        if(errcode) {                                   // RETVAL

LabJack.xs  view on Meta::CPAN

  INIT:
        long *i, *j, *k;
        long  errcode;
        long  state;

  PPCODE:
        errcode = EDigitalIn(&idnum, 0, channel, readD, &state);

        // Return the results to perl in a big array
        if(errcode) {
          char errorString[51];

LabJack.xs  view on Meta::CPAN


  INIT:
    long errcode;
    float volts;

  PPCODE:
    errcode = BitsToVolts(chnum, chgain, bits, &volts);

    // Return the results to perl in a big array
    if(errcode) {
        char errorString[51];

LabJack.xs  view on Meta::CPAN


 INIT:
    long errcode;

    long   bits;
  PPCODE:
    errcode = VoltsToBits(chnum, chgain, volts, &bits);

    // Return the results to perl in a big array
    if(errcode) {
        char errorString[51];

LabJack.xs  view on Meta::CPAN

//    int  nstateD;
//    unsigned long *mycount;

    // Check that they passed an array of channels, and count the elements

    PPCODE:
        // Run the command
        errcode = Counter(&idnum, demo, &stateD, &stateIO, resetCounter, enableSTB, &enableSTB);

        // Return the results to perl in a big array
        if(errcode) {

LabJack.xs  view on Meta::CPAN

	j = &trisD;
	k = &stateD;
	l = &stateIO;
	m = &outputD;

  PPCODE:
	errcode = DigitalIO(i, demo, j, trisIO, k, l, updateDigital, m);

        // Return the results to perl in a big array
        if(errcode) {
          char errorString[51];

LabJack.xs  view on Meta::CPAN

void
GetErrorString(errn);
	long  errn
  INIT:
	char str[255];
  PPCODE:
	GetErrorString ( errn, str );
	XPUSHs(sv_2mortal(newSVpv(str,0)));

#// ###########################################################################
=head

LabJack.xs  view on Meta::CPAN

long
GetWinVersion()
  INIT:
	unsigned long maj, min, build, platform, Packmaj, Packmin;
	long errcode;
  PPCODE:
	errcode = GetWinVersion(&maj, &min, &build, &platform, &Packmaj, &Packmin);

        // Return the results to perl in a big array
        if(errcode) {
          char errorString[51];

LabJack.xs  view on Meta::CPAN

	long configD
	long numWriteRead
	long data
  INIT:
	long i, errcode;
  PPCODE:
	errcode = Synch(&idnum, demo, mode, msDelay, husDelay, controlCS, csLine, csState, configD, numWriteRead, &data);

        // Return the results to perl in a big array
        if(errcode) {
          char errorString[51];

LabJack.xs  view on Meta::CPAN

	long address
  INIT:
	long errcode;
	long d0, d1, d2, d3;

  PPCODE:
	errcode = ReadMem(&idnum, address, &d3, &d2, &d1, &d0);

        // Return the results to perl in a big array
        if(errcode) {
          char errorString[51];

 view all matches for this distribution


Device-PiFace

 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


Device-Velleman-K8055-libk8055

 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


Dialog

 view release on metacpan or  search on metacpan

Dialog.xs  view on Meta::CPAN

	PREINIT:
	int item_no, i, cancel, zero = 0;
	uchar **item_list, **item_ptr, *item;
	uchar *result;
	size_t size = 0, tmpsz, len;
	PPCODE:
	item_no = items - 5;
	New(0,item_list,2 * item_no,uchar*);
	item_ptr = item_list;
	for(i=0; i<item_no; i++) {
	  *(item_ptr++) = item = SvPV(ST(i+5), na);

Dialog.xs  view on Meta::CPAN

	PREINIT:
	int item_no, i, cancel;
	uchar **item_list, **item_ptr, *item;
	uchar *result, *strb, *stre;
	size_t size = 1, len;
	PPCODE:
	item_no = items - 5;
	New(0,item_list,3 * item_no,uchar*);
	item_ptr = item_list;
	for(i=0; i<item_no; i++) {
	  *(item_ptr++) = item = SvPV(ST(i+5), na);

Dialog.xs  view on Meta::CPAN

	PREINIT:
	int item_no, i, cancel;
	uchar **item_list, **item_ptr, *item;
	uchar *result;
	size_t size = 0, tmpsz, len;
	PPCODE:
	item_no = items - 5;
	New(0,item_list,3 * item_no,uchar*);
	item_ptr = item_list;
	for(i=0; i<item_no; i++) {
	  *(item_ptr++) = item = SvPV(ST(i+5), na);

Dialog.xs  view on Meta::CPAN

char *		line
	PROTOTYPE: $$$$$
	PREINIT:
	int cancel;
	uchar *result;
	PPCODE:
	New(0,result,MAX_LEN,char);
	strncpy(result, line, MAX_LEN);
	cancel = dialog_inputbox(title, prompt, height, width, result);
	if(!cancel) XPUSHs(sv_2mortal(newSVpv(result, 0)));
	Safefree(result);

 view all matches for this distribution


Digest-BLAKE

 view release on metacpan or  search on metacpan

BLAKE.xs  view on Meta::CPAN

    RETVAL

void
reset (self)
    Digest::BLAKE self
PPCODE:
    if (Init(self, self->hashbitlen) != SUCCESS)
        XSRETURN_UNDEF;
    XSRETURN(1);

int

BLAKE.xs  view on Meta::CPAN

    Digest::BLAKE self
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    for (i = 1; i < items; i++) {
        data = (unsigned char *)(SvPV(ST(i), len));
        if (Update(self, data, len << 3) != SUCCESS)
            XSRETURN_UNDEF;
    }

BLAKE.xs  view on Meta::CPAN

    int bitlen
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    if (! bitlen)
        XSRETURN(1);
    data = (unsigned char *)(SvPV(msg, len));
    if (bitlen > len << 3)
        bitlen = len << 3;

 view all matches for this distribution


Digest-BLAKE2

 view release on metacpan or  search on metacpan

in/src/BLAKE2x.xs  view on Meta::CPAN

    Digest::BLAKE2x self
PREINIT:
    int i;
    uint8_t *in;
    STRLEN inlen;
PPCODE:
    for (i = 1; i < items; i++) {
        in = (uint8_t *)(SvPV(ST(i), inlen));
        blake2x_update(self, in, inlen);
    }
    XSRETURN(1);

 view all matches for this distribution


Digest-BMW

 view release on metacpan or  search on metacpan

BMW.xs  view on Meta::CPAN

    RETVAL

void
reset (self)
    Digest::BMW self
PPCODE:
    if (Init(self, self->hashbitlen) != SUCCESS)
        XSRETURN_UNDEF;
    XSRETURN(1);

int

BMW.xs  view on Meta::CPAN

    Digest::BMW self
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    for (i = 1; i < items; i++) {
        data = (unsigned char *)(SvPV(ST(i), len));
        if (Update(self, data, len << 3) != SUCCESS)
            XSRETURN_UNDEF;
    }

BMW.xs  view on Meta::CPAN

    int bitlen
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    if (! bitlen)
        XSRETURN(1);
    data = (unsigned char *)(SvPV(msg, len));
    if (bitlen > len << 3)
        bitlen = len << 3;

 view all matches for this distribution


Digest-CubeHash-XS

 view release on metacpan or  search on metacpan

XS.xs  view on Meta::CPAN

    RETVAL

void
reset (self)
    Digest::CubeHash::XS self
PPCODE:
    if (Init(self, self->hashbitlen) != SUCCESS)
        XSRETURN_UNDEF;
    XSRETURN(1);

int

XS.xs  view on Meta::CPAN

    Digest::CubeHash::XS self
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    for (i = 1; i < items; i++) {
        data = (unsigned char *)(SvPV(ST(i), len));
        if (Update(self, data, len << 3) != SUCCESS)
            XSRETURN_UNDEF;
    }

XS.xs  view on Meta::CPAN

    int bitlen
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    if (! bitlen)
        XSRETURN(1);
    data = (unsigned char *)(SvPV(msg, len));
    if (bitlen > len << 3)
        bitlen = len << 3;

 view all matches for this distribution


Digest-ECHO

 view release on metacpan or  search on metacpan

ECHO.xs  view on Meta::CPAN

    RETVAL

void
reset (self)
    Digest::ECHO self
PPCODE:
    if (Init(self, self->hashbitlen) != SUCCESS)
        XSRETURN_UNDEF;
    XSRETURN(1);

int

ECHO.xs  view on Meta::CPAN

    Digest::ECHO self
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    for (i = 1; i < items; i++) {
        data = (unsigned char *)(SvPV(ST(i), len));
        if (Update(self, data, len << 3) != SUCCESS)
            XSRETURN_UNDEF;
    }

ECHO.xs  view on Meta::CPAN

    int bitlen
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    if (! bitlen)
        XSRETURN(1);
    data = (unsigned char *)(SvPV(msg, len));
    if (bitlen > len << 3)
        bitlen = len << 3;

 view all matches for this distribution


Digest-EdonR

 view release on metacpan or  search on metacpan

EdonR.xs  view on Meta::CPAN

    RETVAL

void
reset (self)
    Digest::EdonR self
PPCODE:
    if (Init(self, self->hashbitlen) != SUCCESS)
        XSRETURN_UNDEF;
    XSRETURN(1);

int

EdonR.xs  view on Meta::CPAN

    Digest::EdonR self
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    for (i = 1; i < items; i++) {
        data = (unsigned char *)(SvPV(ST(i), len));
        if (Update(self, data, len << 3) != SUCCESS)
            XSRETURN_UNDEF;
    }

EdonR.xs  view on Meta::CPAN

    int bitlen
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    if (! bitlen)
        XSRETURN(1);
    data = (unsigned char *)(SvPV(msg, len));
    if (bitlen > len << 3)
        bitlen = len << 3;

 view all matches for this distribution


Digest-FNV

 view release on metacpan or  search on metacpan

FNV.xs  view on Meta::CPAN

Fnv64_t *
fnv64_t(a)
    SV *  a
INIT:
    Fnv64_t *   tfnv;
PPCODE:
    tfnv = fnv64_t(SvPV_nolen(a));
    if (tfnv==0UL) {
        XPUSHs(sv_2mortal(newSVnv(-1)));
    }
    else {

FNV.xs  view on Meta::CPAN

Fnv64_t *
fnv64a_t(a)
    SV *  a
INIT:
    Fnv64_t *   tfnv;
PPCODE:
    tfnv = fnv64a_t(SvPV_nolen(a));
    if (tfnv==0UL) {
        XPUSHs(sv_2mortal(newSVnv(-1)));
    }
    else {

 view all matches for this distribution


Digest-FarmHash

 view release on metacpan or  search on metacpan

lib/Digest/FarmHash.xs  view on Meta::CPAN


void
farmhash128(const char* data, size_t length(data), ...)
PREINIT:
    uint128_t ret;
PPCODE:
    if (items == 1) {
        ret = Hash128(data, STRLEN_length_of_data);
    } else if (items == 3) {
        ret = Hash128WithSeed(data, STRLEN_length_of_data, Uint128(SvUV(ST(1)), SvUV(ST(2))));
    } else {

lib/Digest/FarmHash.xs  view on Meta::CPAN


void
farmhash_fingerprint128(const char* data, size_t length(data))
PREINIT:
    uint128_t ret;
PPCODE:
    ret = Fingerprint128(data, STRLEN_length_of_data);
    EXTEND(SP, 2);
    mPUSHu(Uint128Low64(ret));
    mPUSHu(Uint128High64(ret));

 view all matches for this distribution


Digest-Fugue

 view release on metacpan or  search on metacpan

Fugue.xs  view on Meta::CPAN

    RETVAL

void
reset (self)
    Digest::Fugue self
PPCODE:
    if (Init(self, self->hashbitlen) != SUCCESS)
        XSRETURN_UNDEF;
    XSRETURN(1);

int

Fugue.xs  view on Meta::CPAN

    Digest::Fugue self
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    for (i = 1; i < items; i++) {
        data = (unsigned char *)(SvPV(ST(i), len));
        if (Update(self, data, len << 3) != SUCCESS)
            XSRETURN_UNDEF;
    }

Fugue.xs  view on Meta::CPAN

    int bitlen
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    if (! bitlen)
        XSRETURN(1);
    data = (unsigned char *)(SvPV(msg, len));
    if (bitlen > len << 3)
        bitlen = len << 3;

 view all matches for this distribution


Digest-GOST

 view release on metacpan or  search on metacpan

GOST.xs  view on Meta::CPAN

    RETVAL

void
reset (self)
    Digest::GOST self
PPCODE:
    rhash_gost_init(self);
    XSRETURN(1);

void
add (self, ...)
    Digest::GOST self
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    for (i = 1; i < items; i++) {
        data = (unsigned char *)(SvPV(ST(i), len));
        rhash_gost_update(self, data, len);
    }
    XSRETURN(1);

GOST.xs  view on Meta::CPAN

    RETVAL

void
reset (self)
    Digest::GOST::CryptoPro self
PPCODE:
    rhash_gost_cryptopro_init(self);
    XSRETURN(1);

void
digest (self)

 view all matches for this distribution


Digest-Groestl

 view release on metacpan or  search on metacpan

Groestl.xs  view on Meta::CPAN

    RETVAL

void
reset (self)
    Digest::Groestl self
PPCODE:
    if (Init(self, self->hashbitlen) != SUCCESS)
        XSRETURN_UNDEF;
    XSRETURN(1);

int

Groestl.xs  view on Meta::CPAN

    Digest::Groestl self
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    for (i = 1; i < items; i++) {
        data = (unsigned char *)(SvPV(ST(i), len));
        if (Update(self, data, len << 3) != SUCCESS)
            XSRETURN_UNDEF;
    }

Groestl.xs  view on Meta::CPAN

    int bitlen
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    if (! bitlen)
        XSRETURN(1);
    data = (unsigned char *)(SvPV(msg, len));
    if (bitlen > len << 3)
        bitlen = len << 3;

 view all matches for this distribution


Digest-Hamsi

 view release on metacpan or  search on metacpan

Hamsi.xs  view on Meta::CPAN

    RETVAL

void
reset (self)
    Digest::Hamsi self
PPCODE:
    if (Init(self, self->hashbitlen) != SUCCESS)
        XSRETURN_UNDEF;
    XSRETURN(1);

int

Hamsi.xs  view on Meta::CPAN

    Digest::Hamsi self
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    for (i = 1; i < items; i++) {
        data = (unsigned char *)(SvPV(ST(i), len));
        if (Update(self, data, len << 3) != SUCCESS)
            XSRETURN_UNDEF;
    }

Hamsi.xs  view on Meta::CPAN

    int bitlen
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    if (! bitlen)
        XSRETURN(1);
    data = (unsigned char *)(SvPV(msg, len));
    if (bitlen > len << 3)
        bitlen = len << 3;

 view all matches for this distribution


Digest-JH

 view release on metacpan or  search on metacpan

JH.xs  view on Meta::CPAN

    RETVAL

void
reset (self)
    Digest::JH self
PPCODE:
    if (Init(self, self->hashbitlen) != SUCCESS)
        XSRETURN_UNDEF;
    XSRETURN(1);

int

JH.xs  view on Meta::CPAN

    Digest::JH self
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    for (i = 1; i < items; i++) {
        data = (unsigned char *)(SvPV(ST(i), len));
        if (Update(self, data, len << 3) != SUCCESS)
            XSRETURN_UNDEF;
    }

JH.xs  view on Meta::CPAN

    int bitlen
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    if (! bitlen)
        XSRETURN(1);
    data = (unsigned char *)(SvPV(msg, len));
    if (bitlen > len << 3)
        bitlen = len << 3;

 view all matches for this distribution


Digest-Keccak

 view release on metacpan or  search on metacpan

Keccak.xs  view on Meta::CPAN

    RETVAL

void
reset (self)
    Digest::Keccak self
PPCODE:
    if (Init(self, self->hashbitlen) != SUCCESS)
        XSRETURN_UNDEF;
    XSRETURN(1);

int

Keccak.xs  view on Meta::CPAN

    Digest::Keccak self
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    for (i = 1; i < items; i++) {
        data = (unsigned char *)(SvPV(ST(i), len));
        if (Update(self, data, len << 3) != SUCCESS)
            XSRETURN_UNDEF;
    }

Keccak.xs  view on Meta::CPAN

    int bitlen
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    if (! bitlen)
        XSRETURN(1);
    data = (unsigned char *)(SvPV(msg, len));
    if (bitlen > len << 3)
        bitlen = len << 3;

 view all matches for this distribution


Digest-Luffa

 view release on metacpan or  search on metacpan

Luffa.xs  view on Meta::CPAN

    RETVAL

void
reset (self)
    Digest::Luffa self
PPCODE:
    if (Init(self, self->hashbitlen) != SUCCESS)
        XSRETURN_UNDEF;
    XSRETURN(1);

int

Luffa.xs  view on Meta::CPAN

    Digest::Luffa self
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    for (i = 1; i < items; i++) {
        data = (unsigned char *)(SvPV(ST(i), len));
        if (Update(self, data, len << 3) != SUCCESS)
            XSRETURN_UNDEF;
    }

Luffa.xs  view on Meta::CPAN

    int bitlen
PREINIT:
    int i;
    unsigned char *data;
    STRLEN len;
PPCODE:
    if (! bitlen)
        XSRETURN(1);
    data = (unsigned char *)(SvPV(msg, len));
    if (bitlen > len << 3)
        bitlen = len << 3;

 view all matches for this distribution


Digest-MD2

 view release on metacpan or  search on metacpan

MD2.xs  view on Meta::CPAN

void
new(xclass)
	SV* xclass
    PREINIT:
	MD2_CTX* context;
    PPCODE:
	if (!SvROK(xclass)) {
	    STRLEN my_na;
	    char *sclass = SvPV(xclass, my_na);
	    New(55, context, 1, MD2_CTX);
	    ST(0) = sv_newmortal();

MD2.xs  view on Meta::CPAN

	SV* self
    PREINIT:
	MD2_CTX* cont = get_md2_ctx(self);
	char *myname = sv_reftype(SvRV(self),TRUE);
	MD2_CTX* context;
    PPCODE:
	STRLEN my_na;
	New(55, context, 1, MD2_CTX);
	ST(0) = sv_newmortal();
	sv_setref_pv(ST(0), myname , (void*)context);
	SvREADONLY_on(SvRV(ST(0)));

MD2.xs  view on Meta::CPAN

    PREINIT:
	MD2_CTX* context = get_md2_ctx(self);
	int i;
	unsigned char *data;
	STRLEN len;
    PPCODE:
	for (i = 1; i < items; i++) {
	    data = (unsigned char *)(SvPVbyte(ST(i), len));
	    MD2Update(context, data, len);
	}
	XSRETURN(1);  /* self */

MD2.xs  view on Meta::CPAN

	Digest::MD2::digest    = F_BIN
	Digest::MD2::hexdigest = F_HEX
	Digest::MD2::b64digest = F_B64
    PREINIT:
	unsigned char digeststr[16];
    PPCODE:
        MD2Final(digeststr, context);
	MD2Init(context);  /* In case it is reused */
        ST(0) = make_mortal_sv(digeststr, ix);
        XSRETURN(1);

MD2.xs  view on Meta::CPAN

	MD2_CTX ctx;
	int i;
	unsigned char *data;
        STRLEN len;
	unsigned char digeststr[16];
    PPCODE:
	MD2Init(&ctx);

	if (DOWARN) {
            char *msg = 0;
	    if (items == 1) {

 view all matches for this distribution


Digest-MD4

 view release on metacpan or  search on metacpan

MD4.xs  view on Meta::CPAN

void
new(xclass)
	SV* xclass
    PREINIT:
	MD4_CTX* context;
    PPCODE:
	if (!SvROK(xclass)) {
	    STRLEN my_na;
	    char *sclass = SvPV(xclass, my_na);
	    New(55, context, 1, MD4_CTX);
	    context->signature = MD4_CTX_SIGNATURE;

MD4.xs  view on Meta::CPAN

	SV* self
    PREINIT:
	MD4_CTX* cont = get_md4_ctx(self);
	const char *myname = sv_reftype(SvRV(self),TRUE);
	MD4_CTX* context;
    PPCODE:
	New(55, context, 1, MD4_CTX);
	ST(0) = sv_newmortal();
	sv_setref_pv(ST(0), myname , (void*)context);
	SvREADONLY_on(SvRV(ST(0)));
	memcpy(context,cont,sizeof(MD4_CTX));

MD4.xs  view on Meta::CPAN

    PREINIT:
	MD4_CTX* context = get_md4_ctx(self);
	int i;
	unsigned char *data;
	STRLEN len;
    PPCODE:
	for (i = 1; i < items; i++) {
	    data = (unsigned char *)(SvPVbyte(ST(i), len));
	    MD4Update(context, data, len);
	}
	XSRETURN(1);  /* self */

MD4.xs  view on Meta::CPAN

	Digest::MD4::digest    = F_BIN
	Digest::MD4::hexdigest = F_HEX
	Digest::MD4::b64digest = F_B64
    PREINIT:
	unsigned char digeststr[16];
    PPCODE:
        MD4Final(digeststr, context);
	MD4Init(context);  /* In case it is reused */
        ST(0) = make_mortal_sv(digeststr, ix);
        XSRETURN(1);

MD4.xs  view on Meta::CPAN

	MD4_CTX ctx;
	int i;
	unsigned char *data;
        STRLEN len;
	unsigned char digeststr[16];
    PPCODE:
	MD4Init(&ctx);

	if (DOWARN) {
            char *msg = 0;
	    if (items == 1) {

 view all matches for this distribution


Digest-MD5-M4p

 view release on metacpan or  search on metacpan

M4p.xs  view on Meta::CPAN

void
new(xclass)
	SV* xclass
    PREINIT:
	MD5_CTX* context;
    PPCODE:
	if (!SvROK(xclass)) {
	    STRLEN my_na;
	    char *sclass = SvPV(xclass, my_na);
	    New(55, context, 1, MD5_CTX);
	    context->signature = MD5_CTX_SIGNATURE;

M4p.xs  view on Meta::CPAN

	SV* self
    PREINIT:
	MD5_CTX* cont = get_md5_ctx(aTHX_ self);
	char *myname = sv_reftype(SvRV(self),TRUE);
	MD5_CTX* context;
    PPCODE:
	STRLEN my_na;
	New(55, context, 1, MD5_CTX);
	ST(0) = sv_newmortal();
	sv_setref_pv(ST(0), myname , (void*)context);
	SvREADONLY_on(SvRV(ST(0)));

M4p.xs  view on Meta::CPAN

    PREINIT:
	MD5_CTX* context = get_md5_ctx(aTHX_ self);
	int i;
	unsigned char *data;
	STRLEN len;
    PPCODE:
	for (i = 1; i < items; i++) {
	    data = (unsigned char *)(SvPVbyte(ST(i), len));
	    MD5Update(context, data, len);
	}
	XSRETURN(1);  /* self */

M4p.xs  view on Meta::CPAN

	Digest::MD5::M4p::digest    = F_BIN
	Digest::MD5::M4p::hexdigest = F_HEX
	Digest::MD5::M4p::b64digest = F_B64
    PREINIT:
	unsigned char digeststr[16];
    PPCODE:
        MD5Final(digeststr, context);
	MD5Init(context);  /* In case it is reused */
        ST(0) = make_mortal_sv(aTHX_ digeststr, ix);
        XSRETURN(1);

M4p.xs  view on Meta::CPAN

	MD5_CTX ctx;
	int i;
	unsigned char *data;
        STRLEN len;
	unsigned char digeststr[16];
    PPCODE:
	MD5Init(&ctx);

	if (DOWARN) {
            char *msg = 0;
	    if (items == 1) {

 view all matches for this distribution


Digest-MD5

 view release on metacpan or  search on metacpan

MD5.xs  view on Meta::CPAN

void
new(xclass)
	SV* xclass
    PREINIT:
	MD5_CTX* context;
    PPCODE:
	if (!SvROK(xclass)) {
	    STRLEN my_na;
	    const char *sclass = SvPV(xclass, my_na);
	    New(55, context, 1, MD5_CTX);
	    ST(0) = sv_2mortal(new_md5_ctx(aTHX_ context, sclass));

MD5.xs  view on Meta::CPAN

	SV* self
    PREINIT:
	MD5_CTX* cont = get_md5_ctx(aTHX_ self);
	const char *myname = sv_reftype(SvRV(self),TRUE);
	MD5_CTX* context;
    PPCODE:
	New(55, context, 1, MD5_CTX);
	ST(0) = sv_2mortal(new_md5_ctx(aTHX_ context, myname));
	memcpy(context,cont,sizeof(MD5_CTX));
	XSRETURN(1);

MD5.xs  view on Meta::CPAN

    PREINIT:
	MD5_CTX* context = get_md5_ctx(aTHX_ self);
	int i;
	unsigned char *data;
	STRLEN len;
    PPCODE:
	for (i = 1; i < items; i++) {
            U32 had_utf8 = SvUTF8(ST(i));
	    data = (unsigned char *)(SvPVbyte(ST(i), len));
	    MD5Update(context, data, len);
	    if (had_utf8) sv_utf8_upgrade(ST(i));

MD5.xs  view on Meta::CPAN

	Digest::MD5::digest    = F_BIN
	Digest::MD5::hexdigest = F_HEX
	Digest::MD5::b64digest = F_B64
    PREINIT:
	unsigned char digeststr[16];
    PPCODE:
        MD5Final(digeststr, context);
	MD5Init(context);  /* In case it is reused */
        ST(0) = make_mortal_sv(aTHX_ digeststr, ix);
        XSRETURN(1);

MD5.xs  view on Meta::CPAN

context(ctx, ...)
	MD5_CTX* ctx
    PREINIT:
	char out[16];
        U32 w;
    PPCODE:
	if (items > 2) {
	    STRLEN len;
	    unsigned long blocks = SvUV(ST(1));
	    unsigned char *buf = (unsigned char *)(SvPV(ST(2), len));
	    ctx->A = buf[ 0] | (buf[ 1]<<8) | (buf[ 2]<<16) | (buf[ 3]<<24);

MD5.xs  view on Meta::CPAN

	MD5_CTX ctx;
	int i;
	unsigned char *data;
        STRLEN len;
	unsigned char digeststr[16];
    PPCODE:
	MD5Init(&ctx);

	if ((PL_dowarn & G_WARN_ON) || ckWARN(WARN_SYNTAX)) {
            const char *msg = 0;
	    if (items == 1) {

 view all matches for this distribution


Digest-MD6

 view release on metacpan or  search on metacpan

MD6.xs  view on Meta::CPAN

void
new(xclass, ...)
	SV* xclass
  PREINIT:
    md6_state* context;
  PPCODE:
    int digest_len = (int) SvIV(get_sv("Digest::MD6::HASH_LENGTH", FALSE));
    if (!SvROK(xclass)) {
      STRLEN my_na;
      char *sclass = SvPV(xclass, my_na);
      New(55, context, 1, md6_state);

MD6.xs  view on Meta::CPAN

	SV* self
  PREINIT:
    md6_state* cont = get_md6_ctx(aTHX_ self);
    const char *myname = sv_reftype(SvRV(self),TRUE);
    md6_state* context;
  PPCODE:
    New(55, context, 1, md6_state);
    ST(0) = sv_newmortal();
    sv_setref_pv(ST(0), myname , (void*)context);
    SvREADONLY_on(SvRV(ST(0)));
    memcpy(context,cont,sizeof(md6_state));

MD6.xs  view on Meta::CPAN

void
reset(self)
	SV* self
  PREINIT:
    md6_state* context = get_md6_ctx(aTHX_ self);
  PPCODE:
    MD6Init(context, context->d);
    XSRETURN(1);  /* self */

void
add(self, ...)

MD6.xs  view on Meta::CPAN

  PREINIT:
    md6_state* context = get_md6_ctx(aTHX_ self);
    int i;
    unsigned char *data;
    STRLEN len;
  PPCODE:
    for (i = 1; i < items; i++) {
      data = (unsigned char *)(SvPV(ST(i), len));
      MD6Update(context, data, len);
    }
    XSRETURN(1);  /* self */

MD6.xs  view on Meta::CPAN

    md6_state* context = get_md6_ctx(aTHX_ self);
    int i;
    unsigned char *data;
    STRLEN len;
    IV bits;
  PPCODE:
    if (!(items & 1)) {
      croak("add_bits expects a number of data, length pairs");
    }
    for (i = 1; i < items; i += 2) {
      data = (unsigned char *)(SvPV(ST(i), len));

MD6.xs  view on Meta::CPAN

    Digest::MD6::digest    = F_BIN
    Digest::MD6::hexdigest = F_HEX
    Digest::MD6::b64digest = F_B64
  PREINIT:
    unsigned char digeststr[HASH_MAX_BYTES];
  PPCODE:
    MD6Final(digeststr, context);
    MD6Init(context, context->d);  /* In case it is reused */
    ST(0) = make_mortal_sv(aTHX_ digeststr,  context->d, ix);
    XSRETURN(1);

MD6.xs  view on Meta::CPAN

    md6_state ctx;
    int i;
    unsigned char *data;
    STRLEN len;
    unsigned char digeststr[HASH_MAX_BYTES];
  PPCODE:
    int digest_len = (int) SvIV(get_sv("Digest::MD6::HASH_LENGTH", FALSE));
    MD6Init(&ctx, digest_len);

    if (DOWARN) {
      char *msg = 0;

 view all matches for this distribution


Digest-MurmurHash3

 view release on metacpan or  search on metacpan

src/perl-murmurhash3.xs  view on Meta::CPAN


void
murmur32( char *key, UV seed = 0, IV length(key) )
    PREINIT:
        uint32_t out;
    PPCODE:
        MurmurHash3_x86_32( key, STRLEN_length_of_key, seed, &out );
        EXTEND(SP, 1);
        mXPUSHu( out );

void
murmur128_x86 ( char *key, UV seed = 0, IV length(key) )
    PREINIT:
        uint32_t out[4];
    PPCODE:
        MurmurHash3_x86_128( key, STRLEN_length_of_key, seed, &out );
        EXTEND(SP, 4);
        mXPUSHu( out[0] );
        mXPUSHu( out[1] );
        mXPUSHu( out[2] );

src/perl-murmurhash3.xs  view on Meta::CPAN


void
murmur128_x64 ( char *key, UV seed = 0, IV length(key) )
    PREINIT:
        uint64_t out[2];
    PPCODE:
        MurmurHash3_x64_128( key, STRLEN_length_of_key, seed, &out );
        EXTEND(SP, 2);
        mXPUSHu( out[0] );
        mXPUSHu( out[1] );

 view all matches for this distribution


( run in 1.323 second using v1.01-cache-2.11-cpan-92ad3014f07 )