view release on metacpan or search on metacpan
PREINIT:
int data_len;
INPUT:
char *data = (char *)SvPV(ST(0),data_len);
int bits;
PPCODE:
{
crc_hash_t h;
U32 *rv;
SV *sv;
view all matches for this distribution
view release on metacpan or search on metacpan
crc32(data, ...)
char *data = NO_INIT
PREINIT:
U32 crcinit = 0;
STRLEN data_len;
PPCODE:
int sv_type;
IO *io;
SV *sv;
U32 rv = 0;
{
view all matches for this distribution
view release on metacpan or search on metacpan
DiffLine.xs view on Meta::CPAN
char *s1;
char *s2;
PREINIT:
STRLEN l,l1,l2,nll,i,lpos,lines;
char *nl,lnl;
PPCODE:
l1=SvCUR(ST(0));
l2=SvCUR(ST(1));
nl=SvPV(perl_get_sv("/",FALSE),nll);
if(nll==0) nl="\n";
lnl=nl[nll?nll-1:0];
view all matches for this distribution
view release on metacpan or search on metacpan
lcss_all = 2
PREINIT:
int list_cx;
int wide;
SV* rv;
PPCODE:
if (!SvOK(s) || !SvOK(t))
XSRETURN_UNDEF;
list_cx = GIMME_V == G_ARRAY;
view all matches for this distribution
view release on metacpan or search on metacpan
lrc(data, ...)
char *data = NO_INIT
PREINIT:
unsigned char lrcinit = 0x00;
STRLEN data_len;
PPCODE:
int sv_type;
IO *io;
SV *sv;
unsigned char rv;
{
view all matches for this distribution
view release on metacpan or search on metacpan
INIT:
int i;
int blacks = 0;
int whites = 0;
int colors_in_string_h[colors], colors_in_string_t[colors];
PPCODE:
for ( i = 0; i < colors; i++ ) {
colors_in_string_h[i] = colors_in_string_t[i] = 0;
}
for ( i = 0; i < strlen( hidden ); i++ ) {
if ( hidden[i] == target[i] ) {
INIT:
int i;
int blacks = 0;
int whites = 0;
int colors_in_string_h[colors], colors_in_string_t[colors];
PPCODE:
for ( i = 0; i < colors; i++ ) {
colors_in_string_h[i] = colors_in_string_t[i] = 0;
}
for ( i = 0; i < strlen( hidden ); i++ ) {
if ( hidden[i] == target[i] ) {
int i;
int blacks = 0;
int whites = 0;
int colors = 26;
int colors_in_string_h[colors], colors_in_string_t[colors];
PPCODE:
for ( i = 0; i < colors; i++ ) {
colors_in_string_h[i] = colors_in_string_t[i] = 0;
}
for ( i = 0; i < strlen( hidden ); i++ ) {
if ( hidden[i] == target[i] ) {
INIT:
int i;
int blacks = 0;
int whites = 0;
int colors_in_string_h[colors], colors_in_string_t[colors];
PPCODE:
AV* hidden;
AV* target;
hidden = (AV*) SvRV(hidden_ref);
target = (AV*) SvRV(target_ref);
for ( i = 0; i < colors; i++ ) {
view all matches for this distribution
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
view release on metacpan or search on metacpan
Attribute.xs view on Meta::CPAN
dMY_CXT;
HV* const hinthv = GvHVn(PL_hintgv);
HV* stash;
MAGIC* mg;
I32 i;
PPCODE:
mg = mg_find_by_vtbl((SV*)hinthv, &hook_scope_vtbl);
if(!mg){
sv_magicext((SV*)hinthv, NULL, PERL_MAGIC_ext, &hook_scope_vtbl, NULL, 0);
PL_hints |= HINT_LOCALIZE_HH;
}
view all matches for this distribution
view release on metacpan or search on metacpan
void
checkFunc(svFunc)
SV *svFunc
PPCODE:
{
if (SvROK(svFunc)){
svFunc = SvRV(svFunc);
}
view all matches for this distribution
view release on metacpan or search on metacpan
#ifdef USE_ITHREADS
void
CLONE(...)
PPCODE:
{
tTHX owner;
HV* cloned;
{
#endif /* USE_ITHREADS */
void
disable_cv_call(SV* cv)
PPCODE:
{
if (SvROK(cv)) cv = SvRV(cv);
if (SvTYPE(cv) != SVt_PVCV) croak("Not a CODE reference");
cv_set_call_checker((CV*)cv, disable_function_checker, cv);
XSRETURN_UNDEF;
}
void
disable_named_call(SV* package, SV* func)
PPCODE:
{
HV* stash = gv_stashsv(package, GV_ADD);
HE* hent = hv_fetch_ent(stash, func, 0, 0);
GV* glob = hent ? (GV*)HeVAL(hent) : NULL;
XSRETURN_UNDEF;
}
void
disable_method_call(SV* package, SV* method)
PPCODE:
{
dMY_CXT;
SV* shared_method_sv;
if (!SvIsCOW_shared_hash(method)) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Sub/Filter.xs view on Meta::CPAN
_test_xs(...)
PROTOTYPE: @
PREINIT:
AV *av;
I32 i, len;
PPCODE:
av = get_av("Sub::Filter::got_in", 1);
av_clear(av);
for(i = 0; i != items; i++)
av_store(av, i, SvREFCNT_inc(ST(i)));
av = get_av("Sub::Filter::want_out", 1);
view all matches for this distribution