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
view release on metacpan or search on metacpan
PREINIT:
int i;
UCHR *data;
STRLEN len;
SHA *state;
PPCODE:
if ((state = getSHA(aTHX_ self)) == NULL)
XSRETURN_UNDEF;
for (i = 1; i < items; i++) {
data = (UCHR *) (SvPVbyte(ST(i), len));
while (len > MAX_WRITE_SIZE) {
PREINIT:
UINT bc;
STRLEN len;
SHA *state;
UCHR *data;
PPCODE:
if ((state = getSHA(aTHX_ self)) == NULL)
XSRETURN_UNDEF;
data = (UCHR *) SvPV(packed_state, len);
if (len != (state->alg <= SHA256 ? 116U : 212U))
XSRETURN_UNDEF;
PerlIO * f
PREINIT:
SHA *state;
int n;
UCHR in[IO_BUFFER_SIZE];
PPCODE:
if (!f || (state = getSHA(aTHX_ self)) == NULL)
XSRETURN_UNDEF;
while ((n = (int) PerlIO_read(f, in, sizeof(in))) > 0)
shawrite(in, (ULNG) n << 3, state);
XSRETURN(1);
int n;
int cr = 0;
UCHR *src, *dst;
UCHR in[IO_BUFFER_SIZE+1];
SHA *state;
PPCODE:
if (!f || (state = getSHA(aTHX_ self)) == NULL)
XSRETURN_UNDEF;
while ((n = (int) PerlIO_read(f, in+1, IO_BUFFER_SIZE)) > 0) {
for (dst = in, src = in + 1; n; n--) {
c = *src++;
view all matches for this distribution
view release on metacpan or search on metacpan
void
new(xclass)
SV* xclass
PREINIT:
SHA_INFO* context;
PPCODE:
if (!SvROK(xclass)) {
STRLEN my_na;
char *sclass = SvPV(xclass, my_na);
New(55, context, 1, SHA_INFO);
ST(0) = sv_newmortal();
SV* self
PREINIT:
SHA_INFO* cont = get_sha_info(aTHX_ self);
const char *myname = sv_reftype(SvRV(self),TRUE);
SHA_INFO* context;
PPCODE:
New(55, context, 1, SHA_INFO);
ST(0) = sv_newmortal();
sv_setref_pv(ST(0), myname , (void*)context);
SvREADONLY_on(SvRV(ST(0)));
memcpy(context,cont,sizeof(SHA_INFO));
PREINIT:
SHA_INFO* context = get_sha_info(aTHX_ self);
int i;
unsigned char *data;
STRLEN len;
PPCODE:
for (i = 1; i < items; i++) {
data = (unsigned char *)(SvPVbyte(ST(i), len));
sha_update(context, data, len);
}
XSRETURN(1); /* self */
Digest::SHA1::digest = F_BIN
Digest::SHA1::hexdigest = F_HEX
Digest::SHA1::b64digest = F_B64
PREINIT:
unsigned char digeststr[20];
PPCODE:
sha_final(digeststr, context);
sha_init(context); /* In case it is reused */
ST(0) = make_mortal_sv(aTHX_ digeststr, ix);
XSRETURN(1);
SHA_INFO ctx;
int i;
unsigned char *data;
STRLEN len;
unsigned char digeststr[20];
PPCODE:
sha_init(&ctx);
if (DOWARN) {
const char *msg = 0;
if (items == 1) {
SHA_INFO ctx;
unsigned char *data_pv;
unsigned char test[64];
STRLEN len;
unsigned char digeststr[20];
PPCODE:
sha_init(&ctx);
memset (test, 0, 64);
data_pv = (unsigned char *)(SvPVbyte(data, len));
memcpy (test, data_pv, len);
view all matches for this distribution
view release on metacpan or search on metacpan
PREINIT:
int i;
UCHR *data;
STRLEN len;
SHA3 *state;
PPCODE:
if ((state = getSHA3(aTHX_ self)) == NULL)
XSRETURN_UNDEF;
for (i = 1; i < items; i++) {
data = (UCHR *) (SvPVbyte(ST(i), len));
while (len > MAX_WRITE_SIZE) {
PerlIO * f
PREINIT:
SHA3 *state;
int n;
UCHR in[IO_BUFFER_SIZE];
PPCODE:
if (!f || (state = getSHA3(aTHX_ self)) == NULL)
XSRETURN_UNDEF;
while ((n = (int) PerlIO_read(f, in, sizeof(in))) > 0)
shawrite(in, (ULNG) n << 3, state);
XSRETURN(1);
int n;
int cr = 0;
UCHR *src, *dst;
UCHR in[IO_BUFFER_SIZE+1];
SHA3 *state;
PPCODE:
if (!f || (state = getSHA3(aTHX_ self)) == NULL)
XSRETURN_UNDEF;
while ((n = (int) PerlIO_read(f, in+1, IO_BUFFER_SIZE)) > 0) {
for (dst = in, src = in + 1; n; n--) {
c = *src++;
view all matches for this distribution
view release on metacpan or search on metacpan
SHAvite3.xs view on Meta::CPAN
RETVAL
void
reset (self)
Digest::SHAvite3 self
PPCODE:
if (Init(self, self->hashbitlen) != SUCCESS)
XSRETURN_UNDEF;
XSRETURN(1);
int
SHAvite3.xs view on Meta::CPAN
Digest::SHAvite3 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;
}
SHAvite3.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
view release on metacpan or search on metacpan
RETVAL
void
reset (self)
Digest::SIMD self
PPCODE:
if (Init(self, self->hashbitlen) != SUCCESS)
XSRETURN_UNDEF;
XSRETURN(1);
int
Digest::SIMD 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;
}
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
view release on metacpan or search on metacpan
RETVAL
void
reset (self)
Digest::Shabal self
PPCODE:
if (Init(self, self->hashbitlen) != SUCCESS)
XSRETURN_UNDEF;
XSRETURN(1);
int
Digest::Shabal 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;
}
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
view release on metacpan or search on metacpan
char *
Skein(hashbitlen, data)
int hashbitlen
const BitSequence * data
PPCODE:
if (hashbitlen < 0)
croak("hashbitlen < 0");
{
BitSequence hashval[128];
char ret[256 + 1];
}
char *
skein_256(data)
const BitSequence * data
PPCODE:
{
BitSequence hashval[256/8];
if ( Hash( 256, data, (DataLength) SvCUR(ST(0)) * 8, hashval ) != SUCCESS )
croak("Hash(256) failed");
ST(0) = sv_2mortal(newSVpv(hashval, 256/8));
}
char *
skein_512(data)
const BitSequence * data
PPCODE:
{
char hashval[512/8];
if ( Hash( 512, data, (DataLength) SvCUR(ST(0)) * 8, hashval ) != SUCCESS )
croak("Hash(512) failed");
ST(0) = sv_2mortal(newSVpv(hashval, 512/8));
}
char *
skein_1024(data)
const BitSequence * data
PPCODE:
{
char hashval[1024/8];
if ( Hash( 1024, data, (DataLength) SvCUR(ST(0)) * 8, hashval ) != SUCCESS )
croak("Hash(1024) failed");
ST(0) = sv_2mortal(newSVpv(hashval, 1024/8));
Digest::Skein::256
new(package, hashbitlen=256)
SV* package
int hashbitlen
PPCODE:
if (hashbitlen > 256)
croak("hashbitlen > 256");
if (SvROK(package)) { /* called as $digest->new or $digest->reset */
IV tmp;
Digest__Skein__256 ctx;
}
char *
digest(ctx)
Digest::Skein::256 ctx
PPCODE:
{
char hashval[256/8];
int len = (ctx->h.hashBitLen + 7) >> 3;
if ( Skein_256_Final(ctx, hashval) != SUCCESS )
croak("final() failed");
Digest::Skein::512
new(package, hashbitlen=512)
SV* package
int hashbitlen
PPCODE:
if (hashbitlen > 512)
croak("hashbitlen > 512");
if (SvROK(package)) { /* called as $digest->new or $digest->reset */
IV tmp;
Digest__Skein__512 ctx;
}
char *
digest(ctx)
Digest::Skein::512 ctx
PPCODE:
{
char hashval[512/8];
int len = (ctx->h.hashBitLen + 7) >> 3;
if ( Skein_512_Final(ctx, hashval) != SUCCESS )
croak("final() failed");
Digest::Skein::1024
new(package, hashbitlen=1024)
SV* package
int hashbitlen
PPCODE:
if (hashbitlen > 1024)
croak("hashbitlen > 1024");
if (SvROK(package)) { /* called as $digest->new or $digest->reset */
IV tmp;
Digest__Skein__1024 ctx;
}
char *
digest(ctx)
Digest::Skein::1024 ctx
PPCODE:
{
char hashval[1024/8];
int len = (ctx->h.hashBitLen + 7) >> 3;
if ( Skein1024_Final(ctx, hashval) != SUCCESS )
croak("final() failed");
view all matches for this distribution
view release on metacpan or search on metacpan
src/Spooky.xs view on Meta::CPAN
void
spooky64(const char * key, UV seed_ = 0, IV length(key))
PREINIT:
uint64_t hash;
uint64_t seed;
PPCODE:
{
seed = seed_;
hash = SpookyHash::Hash64(key, STRLEN_length_of_key,seed);
EXTEND(SP, 1);
mXPUSHu( hash );
src/Spooky.xs view on Meta::CPAN
void
spooky128(const char * key, UV seed1 = 0, UV seed2 = 0, IV length(key))
PREINIT:
uint64_t hash1;
uint64_t hash2;
PPCODE:
{
hash1 = seed1;
hash2 = seed2;
SpookyHash::Hash128(key, STRLEN_length_of_key, &hash1, &hash2);
EXTEND(SP, 2);
view all matches for this distribution
view release on metacpan or search on metacpan
hash(...)
PREINIT:
unsigned char *data;
STRLEN len;
word64 res[3];
PPCODE:
data = (unsigned char *)(SvPV(ST(0), len));
tiger(data, len, res);
endian_swap(res);
PREINIT:
unsigned char *data;
STRLEN len;
word64 res[3];
char hexhash_string[49];
PPCODE:
data = (unsigned char *)(SvPV(ST(0), len));
tiger(data, len, res);
/* we don't need an endian swap */
view all matches for this distribution
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
view release on metacpan or search on metacpan
redifining a macro that was defined in hv_func.h. Most of
these macros & typedefs weren't used at all, so I've just
removed them.
Get rid of warnings about unused variables with selective use
of PERL_UNUSED_VAR. I could also just move to PPCODE for some
of this stuff, but meh..
2.01 2014 October 4
Get rid of M::I autoinstall cancer which requires
view all matches for this distribution
view release on metacpan or search on metacpan
int scope
int all
PREINIT:
atlist_t * atlist;
register atlist_t *temp;
PPCODE:
atlist = (atlist_t *) 0;
dua_find(session,rdn,filter,scope,1,all,&atlist);
temp = atlist;
while (temp != NULL)
{
ldap_session_t *session
char *rdn
PREINIT:
atlist_t * atlist;
register atlist_t *temp;
PPCODE:
atlist = (atlist_t *) 0;
dua_find(session,rdn,NULL,0,0,0,&atlist);
temp = atlist;
while (temp != NULL)
{
struct berval **values;
char **attribute;
LDAPMessage *result, *entry;
int i;
PPCODE:
attrs[0] = attr;
attrs[1] = NULL;
if (ldap_search_s(session->dua_ld,rdn,scope,filter,attrs,attrsonly,&result)
!= LDAP_SUCCESS) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dyn/Call/Aggregate.xsh view on Meta::CPAN
void
fields(DCaggr * thing)
PREINIT:
size_t i;
U8 gimme = GIMME_V;
PPCODE:
// clang-format on
if (gimme == G_ARRAY) {
EXTEND(SP, thing->n_fields);
struct DCfield_ *addr;
for (i = 0; i < thing->n_fields; ++i) {
view all matches for this distribution
view release on metacpan or search on metacpan
Ecore/ecore-const-xs.inc view on Meta::CPAN
/* NV nv; Uncomment this if you need to return NVs */
/* const char *pv; Uncomment this if you need to return PVs */
INPUT:
SV * sv;
const char * s = SvPV(sv, len);
PPCODE:
/* Change this to constant(aTHX_ s, len, &iv, &nv);
if you need to return both NVs and IVs */
type = constant(aTHX_ s, len, &iv);
/* Return 1 or 2 items. First is error message, or undef if no error.
Second, if present, is found value */
view all matches for this distribution
view release on metacpan or search on metacpan
adns_finish (ads);
adns_init_logfn (&ads, initflags, SvOK (str) ? SvPVbyte_nolen (str) : 0, 0, 0);
}
void submit (char *owner, int type, int flags, SV *cb)
PPCODE:
{
SV *csv = NEWSV (0, sizeof (struct ctx));
struct ctx *c = (struct ctx *)SvPVX (csv);
int r = adns_submit (ads, owner, type, flags, (void *)c, &c->query);
view all matches for this distribution
view release on metacpan or search on metacpan
src/EV__Gearman.xs view on Meta::CPAN
# Internal: current (read, write) buffer capacities in bytes. Used by
# the test suite to assert that oversized buffers are released after a
# large packet drains. Not part of the public API.
void
_buf_caps(EV::Gearman self)
PPCODE:
{
EXTEND(SP, 2);
mPUSHu(self->rbuf_cap);
mPUSHu(self->wbuf_cap);
}
view all matches for this distribution
view release on metacpan or search on metacpan
src/EV__Kafka.xs view on Meta::CPAN
kf_buf_free(&body);
}
void
api_versions(EV::Kafka::Conn self)
PPCODE:
{
KF_REQUIRE_CONN(self);
if (!self->api_versions_known)
XSRETURN_UNDEF;
src/EV__Kafka.xs view on Meta::CPAN
OUTPUT:
RETVAL
void
_error_name(int code)
PPCODE:
{
const char *name = NULL;
switch (code) {
case 0: name = "NONE"; break;
case 1: name = "OFFSET_OUT_OF_RANGE"; break;
view all matches for this distribution
view release on metacpan or search on metacpan
CvNODEBUG_on (get_cv ("EV::Loop::Async::scope_lock", 0)); /* otherwise calling scope can be the debugger */
}
void
_c_func (SV *loop)
PPCODE:
EXTEND (SP, 2);
PUSHs (sv_2mortal (newSViv (PTR2IV (c_func))));
PUSHs (sv_2mortal (newSViv (SvIVX (SvRV (loop)))));
void
view all matches for this distribution
view release on metacpan or search on metacpan
src/EV__Nats.xs view on Meta::CPAN
RETVAL
void
on_error(self, ...)
EV::Nats self
PPCODE:
if (items > 1) {
CLEAR_HANDLER(self->on_error);
if (SvOK(ST(1)))
self->on_error = newSVsv(ST(1));
}
src/EV__Nats.xs view on Meta::CPAN
PUSHs(sv_2mortal(newSVsv(self->on_error)));
void
on_connect(self, ...)
EV::Nats self
PPCODE:
if (items > 1) {
CLEAR_HANDLER(self->on_connect);
if (SvOK(ST(1)))
self->on_connect = newSVsv(ST(1));
}
src/EV__Nats.xs view on Meta::CPAN
PUSHs(sv_2mortal(newSVsv(self->on_connect)));
void
on_disconnect(self, ...)
EV::Nats self
PPCODE:
if (items > 1) {
CLEAR_HANDLER(self->on_disconnect);
if (SvOK(ST(1)))
self->on_disconnect = newSVsv(ST(1));
}
src/EV__Nats.xs view on Meta::CPAN
#endif
void
stats(self)
EV::Nats self
PPCODE:
EXTEND(SP, 8);
PUSHs(sv_2mortal(newSVpvs("msgs_in")));
PUSHs(sv_2mortal(newSVuv(self->msgs_in)));
PUSHs(sv_2mortal(newSVpvs("msgs_out")));
PUSHs(sv_2mortal(newSVuv(self->msgs_out)));
src/EV__Nats.xs view on Meta::CPAN
self->on_slow_consumer = newSVsv(cb);
void
on_lame_duck(self, ...)
EV::Nats self
PPCODE:
if (items > 1) {
CLEAR_HANDLER(self->on_ldm);
if (SvOK(ST(1)))
self->on_ldm = newSVsv(ST(1));
}
view all matches for this distribution
view release on metacpan or search on metacpan
OUTPUT:
RETVAL
void
ssl_attribute_names(EV::Pg self)
PPCODE:
{
const char * const *names;
AV *av;
int i;
view all matches for this distribution
view release on metacpan or search on metacpan
Websockets.xs view on Meta::CPAN
OUTPUT:
RETVAL
void
connections(EV::Websockets::Context self);
PPCODE:
{
ev_ws_conn_t* conn;
if (self->magic != EV_WS_CTX_MAGIC) XSRETURN_EMPTY;
for (conn = self->connections; conn != NULL; conn = conn->next) {
/* "connected" stays set during the "closing" drain (close() never
view all matches for this distribution
view release on metacpan or search on metacpan
}
}
void
new(class, ...)
PPCODE:
{
const char *class_name = SvPV_nolen(ST(0));
ev_cares_t *self;
struct ares_options opts;
int optmask = 0;
}
void
servers(self)
EV::cares self
PPCODE:
{
char *csv;
REQUIRE_LIVE(self);
csv = ares_get_servers_csv(self->channel);
if (!csv) croak("EV::cares::servers: ares_get_servers_csv failed");
view all matches for this distribution
view release on metacpan or search on metacpan
void prev (ev_stat *w)
ALIAS:
stat = 1
attr = 2
PPCODE:
{
ev_statdata *s = ix ? &w->attr : &w->prev;
if (ix == 1)
ev_stat_stat (e_loop (w), w);
view all matches for this distribution
view release on metacpan or search on metacpan
SV * mi_setns(fichero, tipo_ns)
InputStream fichero
int tipo_ns
PPCODE:
int fd = -1;
ST(0) = sv_newmortal();
SV * mi_unshare(flags)
int flags
PPCODE:
ST(0) = sv_newmortal();
if(unshare(flags) == 0)
XPUSHs(sv_2mortal(newSVnv(0)));
OUTPUT:
RETVAL
#include <sys/vfs.h>
void mi_caps()
PPCODE:
cap_t caps;
caps = cap_get_proc();
view all matches for this distribution
view release on metacpan or search on metacpan
Email-Address-XS.xs view on Meta::CPAN
INIT:
if (items % 2 == 1) {
carp(CARP_WARN, "Odd number of elements in argument list");
XSRETURN_UNDEF;
}
PPCODE:
first_address = NULL;
last_address = NULL;
taint = false;
#ifndef WITHOUT_SvPV_nomg
utf8 = false;
Email-Address-XS.xs view on Meta::CPAN
hv_class = get_perl_class_from_perl_scalar_or_cv(aTHX_ class_scalar, cv);
if (class_scalar && !sv_derived_from_pvn(class_scalar, this_class_name, this_class_len, SVf_UTF8)) {
carp(CARP_WARN, "Class %" SVf " is not derived from %s", SVfARG(class_scalar), this_class_name);
XSRETURN_EMPTY;
}
PPCODE:
first_address = message_address_parse(input, input_len, UINT_MAX, MESSAGE_ADDRESS_PARSE_FLAG_NON_STRICT_DOTS_AS_INVALID);
count = count_address_groups(first_address);
EXTEND(SP, count * 2);
address = first_address;
while (get_next_perl_address_group(aTHX_ &address, &group_scalar, &addresses_scalar, hv_class, utf8, taint)) {
Email-Address-XS.xs view on Meta::CPAN
if (utf8 && !mailbox_utf8)
mailbox = get_perl_scalar_value(aTHX_ mailbox_scalar, &mailbox_len, true, true);
if (utf8 && !domain_utf8)
domain = get_perl_scalar_value(aTHX_ domain_scalar, &domain_len, true, true);
taint = (SvTAINTED(mailbox_scalar) || SvTAINTED(domain_scalar));
PPCODE:
compose_address(&string, &string_len, mailbox, mailbox_len, domain, domain_len);
string_scalar = sv_2mortal(newSVpvn(string, string_len));
string_free(string);
if (utf8)
sv_utf8_decode(string_scalar);
Email-Address-XS.xs view on Meta::CPAN
INIT:
string_scalar = items >= 1 ? ST(0) : &PL_sv_undef;
string = get_perl_scalar_string_value(aTHX_ string_scalar, &string_len, "string", false);
utf8 = SvUTF8(string_scalar);
taint = SvTAINTED(string_scalar);
PPCODE:
split_address(string, string_len, &mailbox, &mailbox_len, &domain, &domain_len);
mailbox_scalar = mailbox ? sv_2mortal(newSVpvn(mailbox, mailbox_len)) : sv_newmortal();
domain_scalar = domain ? sv_2mortal(newSVpvn(domain, domain_len)) : sv_newmortal();
string_free(mailbox);
string_free(domain);
view all matches for this distribution
view release on metacpan or search on metacpan
SV * sText
PREINIT:
STRLEN l ;
char * s ;
tReq * r = CurrReq ;
PPCODE:
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
RETVAL = NULL ; /* avoid warning */
SvGETMAGIC_P4(sText) ;
s = SV2String (sText, l) ;
SV * sText
PREINIT:
STRLEN l ;
char * s ;
tReq * r = CurrReq ;
PPCODE:
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
RETVAL = NULL ; /* avoid warning */
SvGETMAGIC_P4(sText) ;
s = SV2String (sText, l) ;
SV * sText
PREINIT:
STRLEN l ;
char * s ;
tReq * r = CurrReq ;
PPCODE:
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
RETVAL = NULL ; /* avoid warning */
r -> Component.bSubNotEmpty = 1 ;
SvGETMAGIC_P4(sText) ;
char * sId
PREINIT:
STRLEN l ;
const char * s ;
tReq * r = CurrReq ;
PPCODE:
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
r -> Component.bSubNotEmpty = 1 ;
s = embperl_GetText (r, sId) ;
l = strlen (s) ;
tDomNode * pDomNode
SV * sText
PREINIT:
SV * sRet ;
tReq * r = CurrReq ;
PPCODE:
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
RETVAL = NULL ; /* avoid warning */
SvGETMAGIC_P4(sText) ;
sRet = Node_replaceChildWithUrlDATA (r, pDomNode -> xDomTree, pDomNode -> xNode, r -> Component.nCurrRepeatLevel, sText) ;
int xOldChild
SV * sText
PREINIT:
SV * sRet ;
tReq * r = CurrReq ;
PPCODE:
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
RETVAL = NULL ; /* avoid warning */
r -> Component.bSubNotEmpty = 1 ;
SvGETMAGIC_P4(sText) ;
view all matches for this distribution
view release on metacpan or search on metacpan
TECkit_Status hr;
PerlIO *infile;
long filelen;
Byte *fBuff;
SV *mySv;
PPCODE:
if (style & 1)
sourceForm = kForm_UTF8;
else
sourceForm = kForm_Bytes;
if (style & 2)
UInt16 targetForm;
TECkit_Status hr;
Byte *fBuff;
STRLEN filelen;
SV *mySv;
PPCODE:
if (style & 1)
sourceForm = kForm_UTF8;
else
sourceForm = kForm_Bytes;
if (style & 2)
view all matches for this distribution
view release on metacpan or search on metacpan
INIT:
SvGETMAGIC(src);
SvGETMAGIC(check_sv);
check = SvROK(check_sv) ? ENCODE_PERLQQ|ENCODE_LEAVE_SRC : SvOK(check_sv) ? SvIV_nomg(check_sv) : 0;
modify = (check && !(check & ENCODE_LEAVE_SRC));
PPCODE:
if (!SvOK(src))
XSRETURN_UNDEF;
s = modify ? (U8 *)SvPV_force_nomg(src, slen) : (U8 *)SvPV_nomg(src, slen);
if (SvUTF8(src))
utf8_safe_downgrade(aTHX_ &src, &s, &slen, modify);
INIT:
SvGETMAGIC(src);
SvGETMAGIC(check_sv);
check = SvROK(check_sv) ? ENCODE_PERLQQ|ENCODE_LEAVE_SRC : SvOK(check_sv) ? SvIV_nomg(check_sv) : 0;
modify = (check && !(check & ENCODE_LEAVE_SRC));
PPCODE:
if (!SvOK(src))
XSRETURN_UNDEF;
s = modify ? (U8 *)SvPV_force_nomg(src, slen) : (U8 *)SvPV_nomg(src, slen);
e = s+slen;
dst = sv_2mortal(newSV(slen>0?slen:1)); /* newSV() abhors 0 -- inaba */
view all matches for this distribution
view release on metacpan or search on metacpan
SV *
_fix_latin_xs(source, overlong_fatal, ascii_hex)
SV * source
int overlong_fatal
int ascii_hex
PPCODE:
ST(0) = _encoding_fix_latin_xs(source, overlong_fatal, ascii_hex);
XSRETURN(1);
view all matches for this distribution