view release on metacpan or search on metacpan
xs/TITERATOR.xs view on Meta::CPAN
if(!SvREADONLY(SvRV(ST(0))))
delete THIS;
void
_NAMESPACE_::data()
PPCODE:
!!!!USEPAIR
/* iterator for Map */
_T_ & data = (*THIS)->second;
ST(0) = sv_newmortal();
sv_setref_pv(ST(0), "Audio::_T_", (void *)&data);
xs/TITERATOR.xs view on Meta::CPAN
SvREADONLY_on(SvRV(ST(0)));
XSRETURN(1);
void
_NAMESPACE_::next()
PPCODE:
_NAMESPACE_ & i = THIS->operator++();
ST(0) = sv_newmortal();
sv_setref_pv(ST(0), "Audio::_NAMESPACE_", (void *)&i);
SvREADONLY_on(SvRV(ST(0)));
XSRETURN(1);
void
_NAMESPACE_::last()
PPCODE:
_NAMESPACE_ & i = THIS->operator--();
ST(0) = sv_newmortal();
sv_setref_pv(ST(0), "Audio::_NAMESPACE_", (void *)&i);
SvREADONLY_on(SvRV(ST(0)));
XSRETURN(1);
xs/TITERATOR.xs view on Meta::CPAN
#ifdef LONGMOVEMENT
void
_NAMESPACE_::forward(n)
int n
PPCODE:
(void)THIS->operator+=(n);
/* leave ST(0) untouched and return */
//ST(0) = sv_newmortal();
//sv_setref_pv(ST(0), "Audio::_NAMESPACE_", (void *)THIS);
//SvREADONLY_on(SvRV(ST(0)));
XSRETURN(1);
void
_NAMESPACE_::backward(n)
int n
PPCODE:
(void)THIS->operator-=(n);
/* leave ST(0) untouched and return */
//ST(0) = sv_newmortal();
//sv_setref_pv(ST(0), "Audio::_NAMESPACE_", (void *)THIS);
//SvREADONLY_on(SvRV(ST(0)));
xs/TITERATOR.xs view on Meta::CPAN
RETVAL
void
_NAMESPACE_::copy(i)
_NAMESPACE_ * i
PPCODE:
(void)THIS->operator=(*i);
XSRETURN(1);
#endif /* MOREMETHODS */
view all matches for this distribution
view release on metacpan or search on metacpan
XMMSClientCollection.xs view on Meta::CPAN
xmmsc_coll_t *coll
PREINIT:
uint32_t *ret;
size_t size;
unsigned int i = 0;
PPCODE:
ret = xmmsc_coll_get_idlist (coll);
if (ret == NULL)
XSRETURN_UNDEF;
XMMSClientCollection.xs view on Meta::CPAN
xmmsc_coll_t *coll
ALIAS:
operand_list = 1
PREINIT:
xmmsc_coll_t *op;
PPCODE:
PERL_UNUSED_VAR (ix);
for (xmmsc_coll_operand_list_first (coll);
xmmsc_coll_operand_list_entry (coll, &op);
xmmsc_coll_operand_list_next (coll)) {
XMMSClientCollection.xs view on Meta::CPAN
void
xmmsc_coll_attribute_list (xmmsc_coll_t *coll)
PREINIT:
const char *key;
const char *value;
PPCODE:
xmmsc_coll_attribute_list_first (coll);
while (xmmsc_coll_attribute_list_valid (coll)) {
xmmsc_coll_attribute_list_entry (coll, &key, &value);
view all matches for this distribution
view release on metacpan or search on metacpan
aKodePlayer.xs view on Meta::CPAN
void
listPlugins ()
INIT:
std::list<std::string> lst;
PPCODE:
lst = aKode::PluginHandler::listPlugins();
EXTEND(SP,lst.size());
for (std::list<std::string>::const_iterator i=lst.begin(), e=lst.end(); i!=e; ++i) {
XPUSHs(sv_2mortal(newSVpv(i->c_str(),i->length())));
}
void
listSinks ()
INIT:
std::list<std::string> lst;
PPCODE:
lst = aKode::SinkPluginHandler::listSinkPlugins();
EXTEND(SP,lst.size());
for (std::list<std::string>::const_iterator i=lst.begin(), e=lst.end(); i!=e; ++i) {
XPUSHs(sv_2mortal(newSVpv(i->c_str(),i->length())));
}
void
listDecoders ()
INIT:
std::list<std::string> lst;
PPCODE:
lst = aKode::DecoderPluginHandler::listDecoderPlugins();
EXTEND(SP,lst.size());
for (std::list<std::string>::const_iterator i=lst.begin(), e=lst.end(); i!=e; ++i) {
XPUSHs(sv_2mortal(newSVpv(i->c_str(),i->length())));
}
view all matches for this distribution
view release on metacpan or search on metacpan
void
sd_auth(sd, username="")
SDClient * sd
char * username
PPCODE:
{
int result;
if (strlen(username)) strncpy(sd->username, username, LENACMNAME);
EXTEND(sp, 1);
result = sd_auth(sd);
sd_check(password="", username, sd)
char * password
char * username
SDClient * sd
PPCODE:
{
int result;
result = sd_check(password, username, sd);
EXTEND(sp, 1);
void
sd_next(next, sd)
char * next
SDClient * sd
PPCODE:
{
int result;
EXTEND(sp, 1);
result = sd_next(next, sd);
PUSHs(sv_2mortal(newSViv(result)));
view all matches for this distribution
view release on metacpan or search on metacpan
void
AceStartAuth(userID)
char* userID
PPCODE:
STRLEN userIDLen;
SDI_HANDLE handle;
SD_BOOL moreData;
SD_BOOL echoFlag;
SD_I32 respTimeout;
void
AceContinueAuth(handle, resp)
int handle
char* resp
PPCODE:
STRLEN respLen;
SD_BOOL moreData;
SD_BOOL echoFlag;
SD_I32 respTimeout;
SD_I32 nextRespLen;
int
AceGetAuthenticationStatus(handle)
int handle
PPCODE:
SD_I32 authStatus = ACM_ACCESS_DENIED;
RETVAL = AceGetAuthenticationStatus(handle, &authStatus);
EXTEND(sp, 1);
PUSHs(sv_2mortal(newSViv(RETVAL)));
if (RETVAL == ACE_SUCCESS)
int
AceGetAlphanumeric(handle)
int handle
PPCODE:
char val;
RETVAL = AceGetAlphanumeric(handle, &val);
EXTEND(sp, 1);
PUSHs(sv_2mortal(newSViv(RETVAL)));
if (RETVAL == ACE_SUCCESS)
int
AceGetMaxPinLen(handle)
int handle
PPCODE:
char val;
RETVAL = AceGetMaxPinLen(handle, &val);
EXTEND(sp, 1);
PUSHs(sv_2mortal(newSViv(RETVAL)));
if (RETVAL == ACE_SUCCESS)
int
AceGetMinPinLen(handle)
int handle
PPCODE:
char val;
RETVAL = AceGetMinPinLen(handle, &val);
EXTEND(sp, 1);
PUSHs(sv_2mortal(newSViv(RETVAL)));
if (RETVAL == ACE_SUCCESS)
int
AceGetShell(handle)
int handle
PPCODE:
char val[512];
RETVAL = AceGetShell(handle, val);
EXTEND(sp, 1);
PUSHs(sv_2mortal(newSViv(RETVAL)));
if (RETVAL == ACE_SUCCESS)
int
AceGetSystemPin(handle)
int handle
PPCODE:
char val[512];
RETVAL = AceGetSystemPin(handle, val);
EXTEND(sp, 1);
PUSHs(sv_2mortal(newSViv(RETVAL)));
if (RETVAL == ACE_SUCCESS)
int
AceGetTime(handle)
int handle
PPCODE:
INT32BIT val;
RETVAL = AceGetTime(handle, &val);
EXTEND(sp, 1);
PUSHs(sv_2mortal(newSViv(RETVAL)));
if (RETVAL == ACE_SUCCESS)
int
AceGetUserSelectable(handle)
int handle
PPCODE:
char val;
RETVAL = AceGetUserSelectable(handle, &val);
EXTEND(sp, 1);
PUSHs(sv_2mortal(newSViv(RETVAL)));
if (RETVAL == ACE_SUCCESS)
view all matches for this distribution
view release on metacpan or search on metacpan
char *exp
PREINIT:
char **pols;
int count;
int i;
PPCODE:
err = kadm5_get_policies(handle, exp, &pols, &count);
if (err)
XSRETURN_EMPTY;
EXTEND(sp, count);
for (i = 0; i < count; i++)
char *exp
PREINIT:
char **princs;
int count;
int i;
PPCODE:
err = kadm5_get_principals(handle, exp, &princs, &count);
if (err)
XSRETURN_EMPTY;
EXTEND(sp, count);
for (i = 0; i < count; i++)
Authen::Krb5::Admin handle
Authen::Krb5::Principal princ
PREINIT:
krb5_keyblock *keys;
int count, i;
PPCODE:
err = kadm5_randkey_principal(handle, princ, &keys, &count);
if (err)
XSRETURN_EMPTY;
EXTEND(sp, count);
for (i = 0; i < count; i++) {
Authen::Krb5::Admin::Principal princ
PROTOTYPE: $;$
PREINIT:
SV **p;
int n;
PPCODE:
n = princ->kadm5_princ.n_key_data;
if (items > 1) {
for (p = princ->key_data; n--; p++)
SvREFCNT_dec(*p);
Renew(princ->key_data, items - 1, SV *);
PREINIT:
krb5_tl_data *tl, *last_tl;
krb5_octet **db_args;
int i;
PPCODE:
/* arglist will be items - 1, but the last item should be a NULL. */
Newxz(db_args, items, krb5_octet *);
/* pull db args off the stack */
/* grab the arg stack */
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Authen/Krb5.xs view on Meta::CPAN
krb5_get_default_realm()
PREINIT:
char *realm;
PPCODE:
err = krb5_get_default_realm(context,&realm);
if (err || !realm) XSRETURN_UNDEF;
XPUSHs(sv_2mortal(newSVpv(realm,strlen(realm))));
Safefree(realm);
lib/Authen/Krb5.xs view on Meta::CPAN
PREINIT:
char **realmlist;
int i;
PPCODE:
err = krb5_get_host_realm(context,host,&realmlist);
if (err || !realmlist) XSRETURN_UNDEF;
for (i = 0; realmlist[i]; i++) {
XPUSHs(sv_2mortal(newSVpv(realmlist[i],
strlen(realmlist[i]))));
lib/Authen/Krb5.xs view on Meta::CPAN
SV *in
PREINIT:
krb5_data in_data, out_data;
PPCODE:
STRLEN data_length;
data_length = in_data.length;
in_data.data = SvPV(in,data_length);
err = krb5_mk_priv(context,auth_context,&in_data,&out_data,NULL);
if (err) XSRETURN_UNDEF;
lib/Authen/Krb5.xs view on Meta::CPAN
SV *in
PREINIT:
krb5_data in_data, out_data;
PPCODE:
STRLEN data_length;
data_length = in_data.length;
in_data.data = SvPV(in,data_length);
err = krb5_rd_priv(context,auth_context,&in_data,&out_data,NULL);
if (err) XSRETURN_UNDEF;
lib/Authen/Krb5.xs view on Meta::CPAN
PREINIT:
krb5_data in_data;
krb5_creds *out_creds = NULL;
int fd;
PPCODE:
fd = fileno(fh);
STRLEN data_length;
data_length = in_data.length;
in_data.data = SvPV(in,data_length);
err = krb5_sendauth(context,&auth_context,&fd,version,client,server,
lib/Authen/Krb5.xs view on Meta::CPAN
PREINIT:
krb5_ticket *ticket = NULL;
int fd;
PPCODE:
fd = fileno(fh);
err = krb5_recvauth(context,&auth_context,&fd,version,server,0,
keytab,&ticket);
if (err) XSRETURN_UNDEF;
ST(0) = sv_newmortal();
lib/Authen/Krb5.xs view on Meta::CPAN
void
data(p)
Authen::Krb5::Principal p
PPCODE:
if (p->length > 0) {
int len = p->length;
krb5_data *data;
EXTEND(sp,len);
lib/Authen/Krb5.xs view on Meta::CPAN
void
contents(kb)
Authen::Krb5::KeyBlock kb
PPCODE:
/* sv_2mortal here causes 'Attempt to free unreferenced scalar' later */
XPUSHs(newSVpvn((char*)(kb->contents), kb->length));
int
enctype(kb)
lib/Authen/Krb5.xs view on Meta::CPAN
Authen::Krb5::KeyBlock kb
PREINIT:
char buf[256];
PPCODE:
err = krb5_enctype_to_string(kb->enctype, buf, 255);
if (err) {
XSRETURN_UNDEF;
}
XPUSHs(newSVpv(buf, 0));
view all matches for this distribution
view release on metacpan or search on metacpan
pam_handle_t *pamh
PREINIT:
char **res;
int i;
int c;
PPCODE:
res = pam_getenvlist(pamh);
c = 0;
while (res[c] != 0)
c++;
EXTEND(sp, c);
view all matches for this distribution
view release on metacpan or search on metacpan
char *
client_start(sasl)
struct authensasl *sasl
PPCODE:
{
XPUSHp(sasl->initstring, sasl->initstringlen);
}
char *
client_step(sasl, instring)
struct authensasl *sasl
char *instring
PPCODE:
{
SASLCONST char *outstring=NULL;
unsigned int inlen, outlen=0;
if (sasl->errormsg) {
char *
encode(sasl, instring)
struct authensasl *sasl
char *instring
PPCODE:
{
SASLCONST char *outstring=NULL;
unsigned int inlen, outlen=0;
char *
decode(sasl, instring)
struct authensasl *sasl
char *instring
PPCODE:
{
SASLCONST char *outstring=NULL;
unsigned int inlen, outlen=0;
int
property(sasl, ...)
struct authensasl *sasl
PPCODE:
{
SASLCONST void *value=NULL;
STRLEN proplen;
char *name, buf[32];
int x, propnum=-1;
view all matches for this distribution
view release on metacpan or search on metacpan
#else
char *outstring = NULL;
const char *error =NULL;
#endif
PPCODE:
_DEBUG("serverstart mech: %s",sasl->mech);
if (sasl->error_code)
XSRETURN_UNDEF;
#else
char *outstring;
#endif
const char *mech;
PPCODE:
if (sasl->error_code != SASL_OK)
XSRETURN_UNDEF;
_DEBUG("mech: %s",sasl->mech);
#ifdef SASL2
const char *error=NULL;
#endif
int rc;
unsigned int outlen=0;
STRLEN inlen;
PPCODE:
if (sasl->error_code != SASL_CONTINUE)
XSRETURN_UNDEF;
SvPV(ST(1),inlen);
_DEBUG("Server step: %s %d", instring,inlen);
char *
client_step(sasl, instring)
Authen_SASL_XS sasl
char *instring
PPCODE:
{
#ifdef SASL2
const char *outstring=NULL;
#else
char *outstring=NULL;
listmech(sasl,start="",separator="|",end="")
Authen_SASL_XS sasl;
const char* start;
const char* separator;
const char* end;
PPCODE:
{
int rc;
#ifdef SASL2
const char *mechs;
#else
const char *pass;
const char *oldpass;
int flags;
PREINIT:
int rc;
PPCODE:
_DEBUG("setpass: %s,%s,%s,%d",user,pass,oldpass,flags);
rc = sasl_setpass (sasl->conn,user,
pass,strlen(pass),
oldpass,strlen(oldpass),
flags);
Authen_SASL_XS sasl;
const char *user;
const char *pass;
PREINIT:
int rc;
PPCODE:
_DEBUG("checkpass: %s,%s",user,pass);
rc = sasl_checkpass (sasl->conn,
user, strlen(user),
pass, strlen(pass));
XPUSHi(rc);
global_listmech(sasl)
Authen_SASL_XS sasl
PREINIT:
int i;
const char **mechs;
PPCODE:
if (sasl->error_code)
XSRETURN_UNDEF;
mechs = sasl_global_listmech();
if (mechs)
for (i = 0; mechs[i]; i++)
char *
encode(sasl, instring)
Authen_SASL_XS sasl
char *instring
PPCODE:
{
#ifdef SASL2
const char *outstring=NULL;
#else
char *outstring=NULL;
char *
decode(sasl, instring)
Authen_SASL_XS sasl
char *instring
PPCODE:
{
#ifdef SASL2
const char *outstring=NULL;
#else
char *outstring=NULL;
=cut
char *
error(sasl)
Authen_SASL_XS sasl
PPCODE:
{
_DEBUG("Current Error %x",sasl->error_code);
XPUSHs(newSVpv((char *)sasl_errstring(sasl->error_code,NULL,NULL),0));
#ifdef SASL2
int
property(sasl, ...)
Authen_SASL_XS sasl
PPCODE:
{
#ifdef SASL2
const void *value=NULL;
#else
void *value=NULL;
view all matches for this distribution
view release on metacpan or search on metacpan
ByteLoader/ByteLoader.xs view on Meta::CPAN
void
import(...)
PREINIT:
SV *sv = newSVpvn ("", 0);
PPCODE:
if (!sv)
croak ("Could not allocate ByteLoader buffers");
filter_add(byteloader_filter, sv);
void
unimport(...)
PPCODE:
filter_del(byteloader_filter);
# Local variables:
# c-indent-level: 4
view all matches for this distribution
view release on metacpan or search on metacpan
lib/B/CallChecker.xs view on Meta::CPAN
PREINIT:
Perl_call_checker cckfun;
SV *cckobj;
CV *ckfun;
SV *ckobj;
PPCODE:
PUTBACK;
cv_get_call_checker(tgtcv, &cckfun, &cckobj);
if(ckfun_c_is_encoded_perl(cckfun)) {
ckfun_decode_perl_as_c(cckfun, cckobj, &ckfun, &ckobj);
} else {
view all matches for this distribution
view release on metacpan or search on metacpan
Compiling.xs view on Meta::CPAN
PROTOTYPES: DISABLE
void
PL_compiling ()
PPCODE:
XPUSHs (compiling_sv);
BOOT:
{
HV *cop_stash = gv_stashpv ("B::COP", 0);
view all matches for this distribution
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
view release on metacpan or search on metacpan
int offset
int handle_package
PREINIT:
char tmpbuf[sizeof (PL_tokenbuf)];
STRLEN retlen;
PPCODE:
(void)hook_toke_scan_word (aTHX_ offset, handle_package, tmpbuf, sizeof (PL_tokenbuf), &retlen);
EXTEND (SP, 2);
mPUSHp (tmpbuf, retlen);
mPUSHi (retlen);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/B/Hooks/XSUB/CallAsOp.pm view on Meta::CPAN
MODULE = Some::XS PACKAGE = Some::XS
void foo ()
PPCODE:
TRAMPOLINE(foo);
# later, in Perl land...
# the trampoline hook is invoked in an opcode context, instead of as an XSUB
view all matches for this distribution
view release on metacpan or search on metacpan
void
END(...)
PREINIT:
SV * sv;
PPCODE:
PUSHMARK(SP);
PUSHs(sv_2mortal(rcount_all(aTHX)));
PUTBACK;
call_pv("B::Stats::_end", G_VOID);
return; /* skip implicity PUTBACK */
void
INIT(...)
PPCODE:
PUTBACK;
reset_rcount();
return; /* skip implicity PUTBACK */
BOOT:
view all matches for this distribution
view release on metacpan or search on metacpan
bsd_getitimer(which)
int which
PREINIT:
struct itimerval it;
int err;
PPCODE:
err = getitimer(which, &it);
if(err < 0) {
XSRETURN_EMPTY;
}
EXTEND(sp, 4);
int val_sec
int val_usec
PREINIT:
struct itimerval setiv, getiv;
int err;
PPCODE:
setiv.it_interval.tv_sec = ival_sec;
setiv.it_interval.tv_usec = ival_usec;
setiv.it_value.tv_sec = val_sec;
setiv.it_value.tv_usec = val_usec;
err = setitimer(which, &setiv, &getiv);
view all matches for this distribution
view release on metacpan or search on metacpan
void
get_jids()
INIT:
int jids[MAX_JAILS_RETURNED], jcount, i;
PPCODE:
jcount = _get_jids(&jids[0]);
for (i = 0; i < jcount; i++) {
XPUSHs(sv_2mortal(newSVnv(jids[i])));
}
get_xprison(jid)
int jid
INIT:
struct xprison *xp;
struct in_addr in;
PPCODE:
if ((xp = _get_xp(jid)) != NULL) {
in.s_addr = ntohl(xp->pr_ip);
XPUSHs(sv_2mortal(newSViv(xp->pr_version)));
XPUSHs(sv_2mortal(newSViv(xp->pr_id)));
XPUSHs(sv_2mortal(newSVpvf(xp->pr_path)));
view all matches for this distribution
view release on metacpan or search on metacpan
Affinity.xs view on Meta::CPAN
set(obj, num)
SV* obj
SV* num
ALIAS:
from_num = 1
PPCODE:
struct cpusetinfo* info = (struct cpusetinfo*)SvIV(SvRV(obj));
CPU_ZERO(&(info->mask));
UV input = SvUV(num);
view all matches for this distribution
view release on metacpan or search on metacpan
struct kinfo_proc *kip;
kvm_t *kd;
int nr;
char errbuf[_POSIX2_LINE_MAX];
const char *nlistf, *memf;
PPCODE:
nlistf = memf = PATH_DEV_NULL;
kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, errbuf);
kip = _proc_request(kd, request, param, &nr);
if (kip) {
int p;
view all matches for this distribution
view release on metacpan or search on metacpan
Resource.xs view on Meta::CPAN
}
void
_getrlimit(resource)
int resource
PPCODE:
struct rlimit rl;
if (getrlimit(resource, &rl) == 0) {
EXTEND(sp, 2);
PUSHs(sv_2mortal(newSVnv((double)(rl.rlim_cur == RLIM_INFINITY ? -1.0 : rl.rlim_cur))));
PUSHs(sv_2mortal(newSVnv((double)(rl.rlim_max == RLIM_INFINITY ? -1.0 : rl.rlim_max))));
}
void
_getrusage(who = RUSAGE_SELF)
int who
PPCODE:
{
struct rusage ru;
#ifdef SOLARIS_PROCFS
Struct_psinfo psi;
Struct_pstatus pst;
view all matches for this distribution
view release on metacpan or search on metacpan
STRLEN length;
HV *opts;
uint32_t invalid_type;
const char *invalid_key;
PPCODE:
data = SvPV(msg, length);
opts = NULL;
if ( options ) {
if ( SvROK(options) && SvTYPE(SvRV(options)) == SVt_PVHV ) {
SV *doc
SV *options
PREINIT:
bson_t * bson;
HV *opts;
PPCODE:
opts = NULL;
bson = bson_new();
if ( options ) {
if ( SvROK(options) && SvTYPE(SvRV(options)) == SVt_PVHV ) {
opts = (HV *) SvRV(options);
view all matches for this distribution
view release on metacpan or search on metacpan
BackupPC_XS.xs view on Meta::CPAN
BackupPC::XS::PoolRefCnt info;
unsigned int idx;
PREINIT:
bpc_digest digest;
int count;
PPCODE:
{
if ( !bpc_poolRefIterate(info, &digest, &count, &idx) ) {
EXTEND(SP, 3);
PUSHs(sv_2mortal(newSVpvn((char*)digest.digest, digest.len)));
PUSHs(sv_2mortal(newSViv(count)));
BackupPC_XS.xs view on Meta::CPAN
int match;
bpc_digest digest;
off_t poolFileSize;
int errorCnt;
PPCODE:
{
bpc_poolWrite_close(info, &match, &digest, &poolFileSize, &errorCnt);
EXTEND(SP, 4);
PUSHs(sv_2mortal(newSViv(match)));
PUSHs(sv_2mortal(newSVpvn((char*)digest.digest, digest.len)));
BackupPC_XS.xs view on Meta::CPAN
void
digest(dir)
BackupPC::XS::Attrib dir;
PREINIT:
PPCODE:
{
bpc_digest *digest = bpc_attrib_dirDigestGet(dir);
if ( digest && digest->len > 0 ) {
EXTEND(SP, 1);
PUSHs(sv_2mortal(newSVpvn((char*)digest->digest, digest->len)));
BackupPC_XS.xs view on Meta::CPAN
iterate(dir, idx)
BackupPC::XS::Attrib dir;
unsigned int idx;
PREINIT:
bpc_attrib_file *file;
PPCODE:
{
if ( !bpc_attrib_fileIterate(dir, &file, &idx) && file ) {
EXTEND(SP, 2);
PUSHs(sv_2mortal(newRV_noinc((SV*)convert_file2hv(file, file->name))));
PUSHs(sv_2mortal(newSViv(idx)));
BackupPC_XS.xs view on Meta::CPAN
void
digest(fileName, compress)
char *fileName;
int compress;
PREINIT:
PPCODE:
{
bpc_digest digest;
if ( bpc_fileDigest(fileName, compress, &digest) == 0 ) {
EXTEND(SP, 1);
PUSHs(sv_2mortal(newSVpvn((char*)digest.digest, digest.len)));
BackupPC_XS.xs view on Meta::CPAN
int incr;
BackupPC::XS::DeltaRefCnt deltaInfo;
PREINIT:
int retVal;
unsigned int inodeMax = 0;
PPCODE:
{
retVal = bpc_path_refCountAllInodeMax(deltaInfo, path, compress, incr, &inodeMax);
EXTEND(SP, 2);
PUSHs(sv_2mortal(newSViv(retVal)));
PUSHs(sv_2mortal(newSViv(inodeMax)));
view all matches for this distribution
view release on metacpan or search on metacpan
const char * config_string
PREINIT:
zbar_symbol_type_t sym;
zbar_config_t cfg;
int val;
PPCODE:
if(zbar_parse_config(config_string, &sym, &cfg, &val))
croak("invalid configuration setting: %s", config_string);
EXTEND(SP, 3);
PUSHs(LOOKUP_ENUM(symbol_type, sym));
PUSHs(LOOKUP_ENUM(config, cfg));
Barcode::ZBar::Symbol symbol
SV *
zbar_symbol_get_configs(symbol)
Barcode::ZBar::Symbol symbol
PPCODE:
PUSH_ENUM_MASK(config, CFG, zbar_symbol_get_configs(symbol));
SV *
zbar_symbol_get_modifiers(symbol)
Barcode::ZBar::Symbol symbol
PPCODE:
PUSH_ENUM_MASK(modifier, MOD, zbar_symbol_get_modifiers(symbol));
SV *
zbar_symbol_get_data(symbol)
Barcode::ZBar::Symbol symbol
SV *
zbar_symbol_get_loc(symbol)
Barcode::ZBar::Symbol symbol
PREINIT:
unsigned i, size;
PPCODE:
size = zbar_symbol_get_loc_size(symbol);
EXTEND(SP, size);
for(i = 0; i < size; i++) {
AV *pt = (AV*)sv_2mortal((SV*)newAV());
PUSHs(newRV((SV*)pt));
Barcode::ZBar::Symbol symbol
SV *
get_components(symbol)
Barcode::ZBar::Symbol symbol
PPCODE:
PUSH_SYMS(zbar_symbol_first_component(symbol));
MODULE = Barcode::ZBar PACKAGE = Barcode::ZBar::Image PREFIX = zbar_image_
Barcode::ZBar::Image image
void
get_size(image)
Barcode::ZBar::Image image
PPCODE:
EXTEND(SP, 2);
mPUSHu(zbar_image_get_width(image));
mPUSHu(zbar_image_get_height(image));
void
get_crop(image)
Barcode::ZBar::Image image
PREINIT:
unsigned x, y, w, h;
PPCODE:
zbar_image_get_crop(image, &x, &y, &w, &h);
EXTEND(SP, 4);
mPUSHu(x);
mPUSHu(y);
mPUSHu(w);
RETVAL
SV *
get_symbols(image)
Barcode::ZBar::Image image
PPCODE:
PUSH_SYMS(zbar_image_first_symbol(image));
void
zbar_image_set_format(image, format)
Barcode::ZBar::Image image
SV *
get_results(processor)
Barcode::ZBar::Processor processor
PREINIT:
const zbar_symbol_set_t *syms;
PPCODE:
syms = zbar_processor_get_results(processor);
PUSH_SYMS(zbar_symbol_set_first_symbol(syms));
zbar_symbol_set_ref(syms, -1);
int
SV *
get_results(scanner)
Barcode::ZBar::ImageScanner scanner
PREINIT:
const zbar_symbol_set_t *syms;
PPCODE:
syms = zbar_image_scanner_get_results(scanner);
PUSH_SYMS(zbar_symbol_set_first_symbol(syms));
int
scan_image(scanner, image)
SV *
zbar_decoder_get_configs(decoder, symbology)
Barcode::ZBar::Decoder decoder
zbar_symbol_type_t symbology
PPCODE:
if(symbology == ZBAR_NONE)
symbology = zbar_decoder_get_type(decoder);
PUSH_ENUM_MASK(config, CFG, zbar_decoder_get_configs(decoder, symbology));
SV *
zbar_decoder_get_modifiers(decoder)
Barcode::ZBar::Decoder decoder
PPCODE:
PUSH_ENUM_MASK(modifier, MOD, zbar_decoder_get_modifiers(decoder));
int
zbar_decoder_get_direction(decoder)
Barcode::ZBar::Decoder decoder
view all matches for this distribution
view release on metacpan or search on metacpan
Attribute.xs view on Meta::CPAN
ListAttrs(node)
long node;
PREINIT:
char buf[B_ATTR_NAME_LENGTH];
status_t err;
PPCODE:
/* list what attrs BNode finds */
while ((err = ((BNode *) node)->GetNextAttrName(buf)) == B_OK) {
XPUSHs(sv_2mortal(newSVpv(buf, strlen(buf))));
}
view all matches for this distribution
view release on metacpan or search on metacpan
char buf[PATH_MAX];
dirent *de;
int justone = 1;
int i;
int32 pos;
PPCODE:
memset(d, 0, sizeof(d));
if (strcmp("all", volumepath)) { /* nope, it's a pathname */
d[0] = dev_for_path(volumepath);
} else { /* fill up the array with all the device numbers */
i = 0;
view all matches for this distribution
view release on metacpan or search on metacpan
BerkeleyDB.xs view on Meta::CPAN
log_archive(env, flags=0)
u_int32_t flags
BerkeleyDB::Env env
PREINIT:
dMY_CXT;
PPCODE:
{
char ** list;
char ** file;
AV * av;
#ifndef AT_LEAST_DB_3
BerkeleyDB.xs view on Meta::CPAN
void
_db_open_unknown(ref)
SV * ref
PREINIT:
dMY_CXT;
PPCODE:
{
HV * hash ;
SV * sv ;
DB_INFO info ;
BerkeleyDB__Env dbenv = NULL;
BerkeleyDB.xs view on Meta::CPAN
u_int32_t length
PREINIT:
dMY_CXT;
INIT:
ckActive_Database(db->active) ;
PPCODE:
if (GIMME_V == G_ARRAY) {
XPUSHs(sv_2mortal(newSViv(db->partial == DB_DBT_PARTIAL))) ;
XPUSHs(sv_2mortal(newSViv(db->doff))) ;
XPUSHs(sv_2mortal(newSViv(db->dlen))) ;
}
BerkeleyDB.xs view on Meta::CPAN
BerkeleyDB::Common db
PREINIT:
dMY_CXT;
INIT:
ckActive_Database(db->active) ;
PPCODE:
if (GIMME_V == G_ARRAY) {
XPUSHs(sv_2mortal(newSViv(db->partial == DB_DBT_PARTIAL))) ;
XPUSHs(sv_2mortal(newSViv(db->doff))) ;
XPUSHs(sv_2mortal(newSViv(db->dlen))) ;
}
BerkeleyDB.xs view on Meta::CPAN
u_int32_t length
PREINIT:
dMY_CXT;
INIT:
ckActive_Cursor(db->active) ;
PPCODE:
if (GIMME_V == G_ARRAY) {
XPUSHs(sv_2mortal(newSViv(db->partial == DB_DBT_PARTIAL))) ;
XPUSHs(sv_2mortal(newSViv(db->doff))) ;
XPUSHs(sv_2mortal(newSViv(db->dlen))) ;
}
BerkeleyDB.xs view on Meta::CPAN
BerkeleyDB::Cursor db
PREINIT:
dMY_CXT;
INIT:
ckActive_Cursor(db->active) ;
PPCODE:
if (GIMME_V == G_ARRAY) {
XPUSHs(sv_2mortal(newSViv(db->partial == DB_DBT_PARTIAL))) ;
XPUSHs(sv_2mortal(newSViv(db->doff))) ;
XPUSHs(sv_2mortal(newSViv(db->dlen))) ;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/DB/HTS.xs view on Meta::CPAN
Bio::DB::HTS::Alignment b
PROTOTYPE: $
PREINIT:
uint8_t *s;
uint8_t type;
PPCODE:
{
s = bam_get_aux(b); /* s is a khash macro */
while (s < b->data + b->l_data) {
XPUSHs(sv_2mortal(newSVpv((char *) s, 2)));
s += 2;
lib/Bio/DB/HTS.xs view on Meta::CPAN
Bio::DB::HTS::Header bamh
char* region
PROTOTYPE: $
PREINIT:
int seqid,start,end;
PPCODE:
{
bam_parse_region(bamh,
region,
&seqid,
&start,
view all matches for this distribution
view release on metacpan or search on metacpan
fallback/const-xs.inc view on Meta::CPAN
NV nv;
const char *pv;
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, &nv, &pv);
/* 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