view release on metacpan or search on metacpan
QDBM_File.xs view on Meta::CPAN
int vsize;
const char* value;
CBLIST* list;
SV* value_sv;
dMY_CXT;
PPCODE:
SAVESPTR(MY_CXT.comparer);
MY_CXT.comparer = db->comparer;
kbyte = SvPV_const(key, ksize);
list = vlgetlist( vlptr(db), kbyte, (int)ksize );
QDBM_File.xs view on Meta::CPAN
int vsize;
const char* value;
CBLIST* list;
SV* value_sv;
dMY_CXT;
PPCODE:
SAVESPTR(MY_CXT.comparer);
MY_CXT.comparer = db->comparer;
kbyte = SvPV_const(key, ksize);
list = vstgetlist( vstptr(db), kbyte, (int)ksize );
QDBM_File.xs view on Meta::CPAN
search_document(ODEUM* db, const char* word, int max = -1)
PREINIT:
int i;
int length;
ODPAIR* pair;
PPCODE:
pair = odsearch(db, word, max, &length);
if (NULL != pair) {
for (i = 0; i < length; i++) {
mXPUSHi(pair[i].id);
}
QDBM_File.xs view on Meta::CPAN
const char* key;
const char* value;
int ksize;
int vsize;
CBMAP* scores;
PPCODE:
scores = oddocscores(doc, max, db);
if ( 0 == cbmaprnum(scores) ) {
cbmapclose(scores);
XSRETURN_EMPTY;
}
QDBM_File.xs view on Meta::CPAN
ODEUM* db;
int i;
const char* value;
int vsize;
CBLIST* appearance_words;
PPCODE:
if ( sv_isobject(self) && sv_derived_from(self, "QDBM_File::InvertedIndex") ) {
db = (ODEUM*)SvIV( (SV*)SvRV(self) );
appearance_words = cblistopen();
odanalyzetext(db, text, appearance_words, NULL);
}
QDBM_File.xs view on Meta::CPAN
int vsize;
const char* value;
ODPAIR* pair;
SV* errsv;
CBLIST* errors;
PPCODE:
errors = cblistopen();
pair = odquery(db, query, &length, errors);
if (NULL == pair) {
errsv = newSVpvn("", (STRLEN)0);
SAVEMORTALIZESV(errsv);
QDBM_File.xs view on Meta::CPAN
PREINIT:
int i;
const char* value;
int vsize;
const CBLIST* words;
PPCODE:
words = oddocnwords(doc);
if ( 0 < cblistnum(words) ) {
for (i = 0; i < cblistnum(words); i++) {
value = cblistval(words, i, &vsize);
XPUSHs( sv_2mortal( newSVpvn(value, (STRLEN)vsize) ) );
QDBM_File.xs view on Meta::CPAN
PREINIT:
int i;
const char* value;
int vsize;
const CBLIST* words;
PPCODE:
words = oddocawords(doc);
if ( 0 < cblistnum(words) ) {
for (i = 0; i < cblistnum(words); i++) {
value = cblistval(words, i, &vsize);
XPUSHs( sv_2mortal( newSVpvn(value, (STRLEN)vsize) ) );
QDBM_File.xs view on Meta::CPAN
const char* key;
const char* value;
int ksize;
int vsize;
CBMAP* scores;
PPCODE:
scores = oddocscores(doc, max, db);
if ( 0 == cbmaprnum(scores) ) {
cbmapclose(scores);
XSRETURN_EMPTY;
}
view all matches for this distribution
view release on metacpan or search on metacpan
qtcore/src/QtCore4.xs view on Meta::CPAN
#// or an array of possible ids if the signature is ambiguous
void
findMethod( classname, methodname )
char* classname
char* methodname
PPCODE:
QList<Smoke::ModuleIndex> milist;
if ( strcmp( classname, "QGlobalSpace" ) == 0 ) {
// All modules put their global functions in "QGlobalSpace". So we
// have to use each smoke object to look for this method.
for (int i = 0; i < smokeList.size(); ++i) {
qtcore/src/QtCore4.xs view on Meta::CPAN
#// Args: int classId: a smoke classId
#// Returns: An array of strings defining the inheritance list for that class.
void
getIsa( moduleId )
SV* moduleId
PPCODE:
AV* av = (AV*)SvRV(moduleId);
SV** smokeId = av_fetch(av, 0, 0);
SV** classId = av_fetch(av, 1, 0);
Smoke* smoke = smokeList[SvIV(*smokeId)];
Smoke::Index *parents =
qtcore/src/QtCore4.xs view on Meta::CPAN
#// Returns: An array where the first element is the smoke classId for that
#// class, and the second element is the index into the list of smoke objects.
void
findClass( name )
char* name
PPCODE:
Smoke::ModuleIndex mi = qtcore_Smoke->findClass(name);
EXTEND(SP, 2);
PUSHs(sv_2mortal(newSViv(mi.index)));
PUSHs(sv_2mortal(newSViv(smokeList.indexOf(mi.smoke))));
qtcore/src/QtCore4.xs view on Meta::CPAN
SV* sv
void
sv_obj_info(sv)
SV* sv
PPCODE:
smokeperl_object* o = sv_obj_info(sv);
if( !o || !o->ptr )
XSRETURN_UNDEF;
XPUSHs(sv_2mortal(newSViv(o->allocated ? 1 : 0)));
XPUSHs(sv_2mortal(newSVpv(o->smoke->classes[o->classId].className, strlen(o->smoke->classes[o->classId].className))));
view all matches for this distribution
view release on metacpan or search on metacpan
qtcore/src/QtCore4.xs view on Meta::CPAN
#// or an array of possible ids if the signature is ambiguous
void
findMethod( classname, methodname )
char* classname
char* methodname
PPCODE:
QList<Smoke::ModuleIndex> milist;
if ( strcmp( classname, "QGlobalSpace" ) == 0 ) {
// All modules put their global functions in "QGlobalSpace". So we
// have to use each smoke object to look for this method.
for (int i = 0; i < smokeList.size(); ++i) {
qtcore/src/QtCore4.xs view on Meta::CPAN
#// Args: int classId: a smoke classId
#// Returns: An array of strings defining the inheritance list for that class.
void
getIsa( moduleId )
SV* moduleId
PPCODE:
AV* av = (AV*)SvRV(moduleId);
SV** smokeId = av_fetch(av, 0, 0);
SV** classId = av_fetch(av, 1, 0);
Smoke* smoke = smokeList[SvIV(*smokeId)];
Smoke::Index *parents =
qtcore/src/QtCore4.xs view on Meta::CPAN
#// Returns: An array where the first element is the smoke classId for that
#// class, and the second element is the index into the list of smoke objects.
void
findClass( name )
char* name
PPCODE:
Smoke::ModuleIndex mi = qtcore_Smoke->findClass(name);
EXTEND(SP, 2);
PUSHs(sv_2mortal(newSViv(mi.index)));
PUSHs(sv_2mortal(newSViv(smokeList.indexOf(mi.smoke))));
qtcore/src/QtCore4.xs view on Meta::CPAN
SV* sv
void
sv_obj_info(sv)
SV* sv
PPCODE:
smokeperl_object* o = sv_obj_info(sv);
if( !o || !o->ptr )
XSRETURN_UNDEF;
XPUSHs(sv_2mortal(newSViv(o->allocated ? 1 : 0)));
XPUSHs(sv_2mortal(newSVpv(o->smoke->classes[o->classId].className, strlen(o->smoke->classes[o->classId].className))));
view all matches for this distribution
view release on metacpan or search on metacpan
int strl;
STRLEN strlo;
obj = INT2PTR(struct object*, SvIV(SvRV(self)));
strp = (void *)SvPV(value, strlo);
strl = (int)strlo;
PPCODE:
if(strl > obj->rec_len * (obj->que_len - 1)){
XSRETURN_UNDEF;
}
push_queue(obj,strp,strl);
XPUSHs(sv_2mortal(newSVnv(obj->wait_push)));
stat(self)
SV* self
INIT:
struct object * obj;
obj = INT2PTR(struct object*, SvIV(SvRV(self)));
PPCODE:
XPUSHs(sv_2mortal(newSViv(obj->q->top)));
XPUSHs(sv_2mortal(newSViv(obj->q->bottom)));
XPUSHs(sv_2mortal(newSViv(obj->que_len)));
XPUSHs(sv_2mortal(newSViv(obj->rec_len)));
view all matches for this distribution
view release on metacpan or search on metacpan
void
query(dev,uid=getuid(),kind=0)
char * dev
int uid
int kind
PPCODE:
{
char *p = NULL;
int err;
#ifndef NO_RPC
quota_rpc_strerror = NULL;
rpcquery(host,path,uid=getuid(),kind=0)
char * host
char * path
int uid
int kind
PPCODE:
{
#ifndef NO_RPC
struct quota_xs_nfs_rslt rslt;
quota_rpc_strerror = NULL;
if (getnfsquota(host, path, uid, kind, &rslt) == 0) {
void
rpcpeer(port=0,use_tcp=FALSE,timeout=RPC_DEFAULT_TIMEOUT)
unsigned port
unsigned use_tcp
unsigned timeout
PPCODE:
{
#ifndef NO_RPC
quota_rpc_strerror = NULL;
quota_rpc_cfg.port = port;
quota_rpc_cfg.use_tcp = use_tcp;
OUTPUT:
RETVAL
void
getmntent()
PPCODE:
{
#ifndef NO_RPC
quota_rpc_strerror = NULL;
#endif
#ifndef AIX
#endif
}
void
endmntent()
PPCODE:
{
#ifndef NO_RPC
quota_rpc_strerror = NULL;
#endif
if(mtab != NULL) {
view all matches for this distribution
view release on metacpan or search on metacpan
Lirc/Lirc.xs view on Meta::CPAN
if (config)
lirc_freeconfig (config);
void
_get_code()
PPCODE:
char *code;
if (lirc_nextcode (&code) != 0)
croak ("communication error with lircd");
view all matches for this distribution
view release on metacpan or search on metacpan
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode mm;
SV * node;
PPCODE:
if (!SvROK(package)) {
STRLEN my_na;
char *sclass = SvPV(package, my_na);
/* allocate mem for the node */
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode mm = (RDFStore_RDFNode)SvIV(SvRV(me));
int dl=0;
unsigned char * dd=NULL;
PPCODE:
dd = rdfstore_node_get_digest( mm, &dl );
if ( ( dd != NULL ) &&
( dl > 0 ) ) {
ST(0) = sv_2mortal( newSVpv( dd, dl ) );
XSRETURN(1);
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode mm;
SV * resource;
PPCODE:
if (!SvROK(package)) {
STRLEN my_na;
char *sclass = SvPV(package, my_na);
if ( ( namespace != NULL ) &&
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode mm = (RDFStore_RDFNode)SvIV(SvRV(me));
int ll=0;
unsigned char * ns=NULL;
PPCODE:
ns = rdfstore_resource_get_namespace( mm, &ll );
if ( ll <= 0 ) {
XSRETURN_UNDEF;
};
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode mm = (RDFStore_RDFNode)SvIV(SvRV(me));
unsigned char * nc=NULL;
int ll=0;
PPCODE:
nc = rdfstore_resource_get_localname( mm, &ll );
if ( ( nc == NULL ) ||
( ll <= 0 ) ) {
XSRETURN_UNDEF;
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode mm = (RDFStore_RDFNode)SvIV(SvRV(me));
unsigned char * bn=NULL;
int ll=0;
PPCODE:
bn = rdfstore_resource_get_bnode( mm, &ll );
if ( ( bn == NULL ) ||
( ll <= 0 ) ) {
XSRETURN_UNDEF;
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode mm;
SV * literal;
PPCODE:
if (!SvROK(package)) {
STRLEN my_na;
char *sclass = SvPV(package, my_na);
/* strlen() is not UTF8 safe - Perl does this with SvLEN() but must SV* ... */
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_Statement mm;
SV * statement;
PPCODE:
if (!SvROK(package)) {
STRLEN my_na;
char *sclass = SvPV(package, my_na);
mm = new_Statement_Object( subject, predicate, object, context, isreified, identifier );
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_Statement mm = (RDFStore_Statement)SvIV(SvRV(me));
RDFStore_RDFNode nn=NULL;
SV * node;
PPCODE:
nn = rdfstore_statement_get_subject( mm );
if ( nn != NULL ) {
/* bless() the node */
node = sv_newmortal();
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_Statement mm = (RDFStore_Statement)SvIV(SvRV(me));
RDFStore_RDFNode nn=NULL;
SV * node;
PPCODE:
nn = rdfstore_statement_get_predicate( mm );
if ( nn != NULL ) {
/* bless() the node */
node = sv_newmortal();
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_Statement mm = (RDFStore_Statement)SvIV(SvRV(me));
RDFStore_RDFNode nn=NULL;
SV * node;
PPCODE:
nn = rdfstore_statement_get_object( mm );
if ( nn != NULL ) {
/* bless() the node */
node = sv_newmortal();
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_Statement mm = (RDFStore_Statement)SvIV(SvRV(me));
RDFStore_RDFNode nn=NULL;
SV * node;
PPCODE:
nn = rdfstore_statement_get_context( mm );
if ( nn != NULL ) {
/* bless() the node */
node = sv_newmortal();
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_Statement mm = (RDFStore_Statement)SvIV(SvRV(me));
unsigned char * dd = NULL;
int dl=0;
PPCODE:
dd = rdfstore_statement_get_digest( mm, &dl );
if ( ( dd != NULL ) &&
( dl > 0 ) ) {
ST(0) = sv_2mortal( newSVpv( dd, dl ) );
XSRETURN(1);
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_Statement mm = (RDFStore_Statement)SvIV(SvRV(me));
unsigned char * ntriples_rep=NULL;
int nl=0;
PPCODE:
ntriples_rep = rdfstore_statement_to_string( mm, &nl );
if ( ( ntriples_rep == NULL ) ||
( nl <= 0 ) )
XSRETURN_UNDEF;
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_Statement mm = (RDFStore_Statement)SvIV(SvRV(me));
unsigned char * label=NULL;
int ll=0;
PPCODE:
label = rdfstore_statement_get_label( mm, &ll );
if ( ( label == NULL ) ||
( ll <= 0 ) )
XSRETURN_UNDEF;
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore mm;
SV * store;
PPCODE:
if (!SvROK(package)) {
/* bless() the store cursor */
STRLEN my_na;
char *sclass = SvPV(package, my_na);
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore mm = (RDFStore)SvIV(SvRV(me));
int status=0;
RDFStore_RDFNode nn=NULL;
PPCODE:
if ( ! ( ( SvROK(given_context) ) &&
( sv_isa( given_context, "RDFStore::Resource") ) ) ) {
croak("set_context: Invalid statement context\n");
XSRETURN_UNDEF;
};
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore mm = (RDFStore)SvIV(SvRV(me));
RDFStore_RDFNode context=NULL;
SV * node;
PPCODE:
context=rdfstore_get_context( mm );
if ( context != NULL ) {
/* bless() the context into a resource */
RDFStore.xs view on Meta::CPAN
RDFStore mm = (RDFStore)SvIV(SvRV(me));
int status=0;
char uri[RDFSTORE_MAX_URI_LENGTH];
int ll=0;
PPCODE:
status=rdfstore_get_source_uri( mm, uri ); /* should return the len too due to UTF-8 story... */
if ( status )
XSRETURN_UNDEF;
ll = strlen(uri);
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore mm = (RDFStore)SvIV(SvRV(me));
RDFStore_Iterator cc;
SV * iterator;
PPCODE:
cc = rdfstore_elements( mm );
if ( cc != NULL ) {
iterator = sv_newmortal();
sv_setref_pv( iterator, "RDFStore::Iterator", (void*)cc);
RDFStore.xs view on Meta::CPAN
SV ** hval=NULL;
AV * list=NULL;
SV * node=NULL;
int search_type=0;
PPCODE:
if( ! SvROK(rpn) )
XSRETURN_UNDEF;
tp = rdfstore_triple_pattern_new();
RDFStore.xs view on Meta::CPAN
RDFStore_RDFNode res=NULL;
RDFStore_RDFNode ctx=NULL;
RDFStore_Iterator cc;
SV * iterator;
PPCODE:
if ( ! ( ( SvROK(resource) ) &&
( sv_isa( resource, "RDFStore::Resource") ) ) ) {
croak("fetch_object: Invalid resource\n");
XSRETURN_UNDEF;
};
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_Iterator context;
SV * iterator;
store = NULL;
PPCODE:
if (!SvROK(package)) {
/* bless() the store cursor */
STRLEN my_na;
char *sclass = SvPV(package, my_na);
context = rdfstore_elements( store );
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_Statement ss;
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
SV * statement;
PPCODE:
ss = rdfstore_iterator_next ( context );
if ( ss != NULL ) {
/* bless() the statement */
statement = sv_newmortal();
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode resource;
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
SV * node;
PPCODE:
resource = rdfstore_iterator_next_subject ( context );
if ( resource != NULL ) {
/* bless() the node */
node = sv_newmortal();
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode resource;
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
SV * node;
PPCODE:
resource = rdfstore_iterator_next_predicate ( context );
if ( resource != NULL ) {
node = sv_newmortal();
sv_setref_pv( node, "RDFStore::Resource", (void*)resource);
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode object;
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
SV * node;
PPCODE:
object = rdfstore_iterator_next_object ( context );
if ( object != NULL ) {
node = sv_newmortal();
sv_setref_pv( node, ( rdfstore_node_get_type( object ) != RDFSTORE_NODE_TYPE_LITERAL ) ? "RDFStore::Resource" : "RDFStore::Literal", (void*)object);
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode resource;
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
SV * node;
PPCODE:
resource = rdfstore_iterator_next_context ( context );
if ( resource != NULL ) {
node = sv_newmortal();
sv_setref_pv( node, "RDFStore::Resource", (void*)resource);
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_Statement ss;
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
SV * statement;
PPCODE:
ss = rdfstore_iterator_current ( context );
if ( ss != NULL ) {
/* bless() the statement */
statement = sv_newmortal();
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode resource;
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
SV * node;
PPCODE:
resource = rdfstore_iterator_current_subject ( context );
if ( resource != NULL ) {
node = sv_newmortal();
sv_setref_pv( node, "RDFStore::Resource", (void*)resource);
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode resource;
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
SV * node;
PPCODE:
resource = rdfstore_iterator_current_predicate ( context );
if ( resource != NULL ) {
node = sv_newmortal();
sv_setref_pv( node, "RDFStore::Resource", (void*)resource);
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode object;
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
SV * node;
PPCODE:
object = rdfstore_iterator_current_object ( context );
if ( object != NULL ) {
node = sv_newmortal();
sv_setref_pv( node, ( rdfstore_node_get_type( object ) != RDFSTORE_NODE_TYPE_LITERAL ) ? "RDFStore::Resource" : "RDFStore::Literal", (void*)object);
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode resource;
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
SV * node;
PPCODE:
resource = rdfstore_iterator_current_context ( context );
if ( resource != NULL ) {
node = sv_newmortal();
sv_setref_pv( node, "RDFStore::Resource", (void*)resource);
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_Statement ss;
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
SV * statement;
PPCODE:
ss = rdfstore_iterator_first ( context );
if ( ss != NULL ) {
/* bless() the statement */
statement = sv_newmortal();
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode resource;
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
SV * node;
PPCODE:
resource = rdfstore_iterator_first_subject ( context );
if ( resource != NULL ) {
node = sv_newmortal();
sv_setref_pv( node, "RDFStore::Resource", (void*)resource);
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode resource;
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
SV * node;
PPCODE:
resource = rdfstore_iterator_first_predicate ( context );
if ( resource != NULL ) {
node = sv_newmortal();
sv_setref_pv( node, "RDFStore::Resource", (void*)resource);
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode object;
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
SV * node;
PPCODE:
object = rdfstore_iterator_first_object ( context );
if ( object != NULL ) {
node = sv_newmortal();
sv_setref_pv( node, ( rdfstore_node_get_type( object ) != RDFSTORE_NODE_TYPE_LITERAL ) ? "RDFStore::Resource" : "RDFStore::Literal", (void*)object);
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode resource;
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
SV * node;
PPCODE:
resource = rdfstore_iterator_first_context ( context );
if ( resource != NULL ) {
node = sv_newmortal();
sv_setref_pv( node, "RDFStore::Resource", (void*)resource);
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_Statement ss;
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
SV * statement;
PPCODE:
ss = rdfstore_iterator_each ( context );
if ( ss != NULL ) {
/* bless() the statement */
statement = sv_newmortal();
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode resource;
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
SV * node;
PPCODE:
resource = rdfstore_iterator_each_subject ( context );
if ( resource != NULL ) {
node = sv_newmortal();
sv_setref_pv( node, "RDFStore::Resource", (void*)resource);
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode resource;
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
SV * node;
PPCODE:
resource = rdfstore_iterator_each_predicate ( context );
if ( resource != NULL ) {
node = sv_newmortal();
sv_setref_pv( node, "RDFStore::Resource", (void*)resource);
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode object;
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
SV * node;
PPCODE:
object = rdfstore_iterator_each_object ( context );
if ( object != NULL ) {
node = sv_newmortal();
sv_setref_pv( node, ( rdfstore_node_get_type( object ) != RDFSTORE_NODE_TYPE_LITERAL ) ? "RDFStore::Resource" : "RDFStore::Literal", (void*)object);
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_RDFNode resource;
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
SV * node;
PPCODE:
resource = rdfstore_iterator_each_context ( context );
if ( resource != NULL ) {
node = sv_newmortal();
sv_setref_pv( node, "RDFStore::Resource", (void*)resource);
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
RDFStore_Iterator duplicate;
SV * iterator;
PPCODE:
duplicate = rdfstore_iterator_duplicate ( context );
if ( duplicate != NULL ) {
iterator = sv_newmortal();
sv_setref_pv( iterator, "RDFStore::Iterator", (void*)duplicate);
RDFStore.xs view on Meta::CPAN
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
RDFStore_Iterator context1 = (RDFStore_Iterator)SvIV(SvRV(you));
RDFStore_Iterator cc;
SV * iterator;
PPCODE:
cc = rdfstore_iterator_intersect ( context, context1 );
if ( cc != NULL ) {
iterator = sv_newmortal();
sv_setref_pv( iterator, "RDFStore::Iterator", (void*)cc);
SvREADONLY_on(SvRV(iterator));
RDFStore.xs view on Meta::CPAN
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
RDFStore_Iterator context1 = (RDFStore_Iterator)SvIV(SvRV(you));
RDFStore_Iterator cc;
SV * iterator;
PPCODE:
cc = rdfstore_iterator_unite ( context, context1 );
if ( cc != NULL ) {
iterator = sv_newmortal();
sv_setref_pv( iterator, "RDFStore::Iterator", (void*)cc);
SvREADONLY_on(SvRV(iterator));
RDFStore.xs view on Meta::CPAN
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
RDFStore_Iterator context1 = (RDFStore_Iterator)SvIV(SvRV(you));
RDFStore_Iterator cc;
SV * iterator;
PPCODE:
cc = rdfstore_iterator_subtract ( context, context1 );
if ( cc != NULL ) {
iterator = sv_newmortal();
sv_setref_pv( iterator, "RDFStore::Iterator", (void*)cc);
SvREADONLY_on(SvRV(iterator));
RDFStore.xs view on Meta::CPAN
PREINIT:
RDFStore_Iterator context = (RDFStore_Iterator)SvIV(SvRV(me));
RDFStore_Iterator cc;
SV * iterator;
PPCODE:
cc = rdfstore_iterator_complement ( context );
if ( cc != NULL ) {
iterator = sv_newmortal();
sv_setref_pv( iterator, "RDFStore::Iterator", (void*)cc);
SvREADONLY_on(SvRV(iterator));
RDFStore.xs view on Meta::CPAN
PREINIT:
unsigned int utf8_size=0;
unsigned char utf8_buff[RDFSTORE_UTF8_MAXLEN+1]; /* one utf8 char */
bzero(utf8_buff,RDFSTORE_UTF8_MAXLEN);
PPCODE:
if ( rdfstore_utf8_cp_to_utf8( cp, &utf8_size, utf8_buff ) ) {
XSRETURN_UNDEF;
};
memcpy(utf8_buff+utf8_size,"\0",1);
RDFStore.xs view on Meta::CPAN
PREINIT:
unsigned long cp=0;
unsigned int utf8_size=0;
PPCODE:
if ( utf8_buff == NULL )
XSRETURN_UNDEF;
if ( ( rdfstore_utf8_is_utf8( utf8_buff, &utf8_size ) ) && ( utf8_size > 1 ) ) {
RDFStore.xs view on Meta::CPAN
PREINIT:
unsigned int utf8_size=0;
unsigned char utf8_buff[RDFSTORE_UTF8_MAXLEN+1]; /* one utf8 char */
bzero(utf8_buff,RDFSTORE_UTF8_MAXLEN);
PPCODE:
if ( string == NULL )
XSRETURN_UNDEF;
if ( rdfstore_utf8_string_to_utf8( strlen(string), string, &utf8_size, utf8_buff ) ) {
RDFStore.xs view on Meta::CPAN
PREINIT:
unsigned int utf8_size=0;
unsigned char utf8_casefolded_buff[RDFSTORE_UTF8_MAXLEN_FOLD+1]; /* one case-folded utf8 char */
bzero(utf8_casefolded_buff,RDFSTORE_UTF8_MAXLEN_FOLD);
PPCODE:
if ( string == NULL )
XSRETURN_UNDEF;
if ( rdfstore_utf8_string_to_utf8_foldedcase( strlen(string), string, &utf8_size, utf8_casefolded_buff ) ) {
RDFStore.xs view on Meta::CPAN
unsigned char * input
PREINIT:
unsigned char dd[RDFSTORE_SHA_DIGESTSIZE];
PPCODE:
if (! SvPOK(ST(0)) )
XSRETURN_UNDEF;
rdfstore_digest_digest(input, strlen(input), dd);
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
void
completion_matches (text, func_sv)
const char *text;
SV *func_sv;
PPCODE:
if (completion_matches_function_sv) {
SvSetSV(completion_matches_function_sv, func_sv);
}
else {
completion_matches_function_sv = newSVsv(func_sv);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/RPM2.xs view on Meta::CPAN
expand_macro(pkg, str)
char * pkg
char * str
PREINIT:
char *ret;
PPCODE:
(void)pkg; /* Not used */
ret = rpmExpand(str, NULL);
PUSHs(sv_2mortal(newSVpv(ret, 0)));
free(ret);
lib/RPM2.xs view on Meta::CPAN
PREINIT:
rpmts ts;
Header ret;
rpmRC rc;
FD_t fd;
PPCODE:
ts = rpmtsCreate();
/* XXX Determine type of signature verification when reading
vsflags |= _RPMTS_VSF_NOLEGACY;
vsflags |= _RPMTS_VSF_NODIGESTS;
lib/RPM2.xs view on Meta::CPAN
_create_transaction(vsflags)
int vsflags
PREINIT:
rpmts ret;
SV *h_sv;
PPCODE:
/* Looking at librpm, it does not look like this ever
returns error (though maybe it should).
*/
ret = rpmtsCreate();
lib/RPM2.xs view on Meta::CPAN
FILE *fp
PREINIT:
SV *h_sv;
FD_t fd;
Header h;
PPCODE:
fd = fdDup(fileno(fp));
h = headerRead(fd, HEADER_MAGIC_YES);
if (h) {
EXTEND(SP, 1);
lib/RPM2.xs view on Meta::CPAN
rpmdbMatchIterator i
PREINIT:
Header ret;
SV * h_sv;
unsigned int offset;
PPCODE:
ret = rpmdbNextIterator(i);
if (ret)
headerLink(ret);
if(ret != NULL)
offset = rpmdbGetIteratorOffset(i);
lib/RPM2.xs view on Meta::CPAN
Header h
int tag
PREINIT:
rpmtd tagdata;
int ok;
PPCODE:
tagdata = rpmtdNew();
if (tagdata == NULL) {
croak("Out of memory");
}
ok = headerGet(h, tag, tagdata, HEADERGET_DEFAULT);
lib/RPM2.xs view on Meta::CPAN
_header_sprintf(h, format)
Header h
char * format
PREINIT:
char * s;
PPCODE:
s = headerFormat(h, format, NULL);
PUSHs(sv_2mortal(newSVpv((char *)s, 0)));
/* By the way, the #if below is completely useless, free() would work for both */
free(s);
lib/RPM2.xs view on Meta::CPAN
rpmElementType type;
PREINIT:
rpmtsi i;
rpmte te;
const char * NEVR;
PPCODE:
i = rpmtsiInit(t);
if(i == NULL) {
printf("Did not get a thing!\n");
return;
} else {
view all matches for this distribution
view release on metacpan or search on metacpan
src/RPM4.xs view on Meta::CPAN
OUTPUT:
RETVAL
void
moduleinfo()
PPCODE:
mXPUSHs(newSVpv("Hack", 0));
#ifdef HHACK
mXPUSHs(newSVpv("Yes", 0));
#else
mXPUSHs(newSVpv("No", 0));
src/RPM4.xs view on Meta::CPAN
} else
croak("First arg is not a code reference");
void
lastlogmsg()
PPCODE:
mXPUSHs(newSViv(rpmlogCode()));
mXPUSHs(newSVpv((char *) rpmlogMessage(), 0));
int
setlogfile(filename)
src/RPM4.xs view on Meta::CPAN
void
tagName(tag)
int tag
PREINIT:
const char *r = NULL;
PPCODE:
r = rpmTagGetName(tag);
mXPUSHs(newSVpv(r, 0));
void
flagvalue(flagtype, sv_value)
char * flagtype
SV * sv_value
PPCODE:
if (strcmp(flagtype, "loglevel") == 0) {
mXPUSHs(newSViv(sv2constant(sv_value, "rpmlog")));
} else if (strcmp(flagtype, "deptag") == 0) { /* Who will use this ?? */
mXPUSHs(newSViv(sv2deptag(sv_value)));
} else if (strcmp(flagtype, "vsf") == 0) {
src/RPM4.xs view on Meta::CPAN
# Macros functions:
void
expand(name)
char * name
PPCODE:
const char * value = rpmExpand(name, NULL);
mXPUSHs(newSVpv(value, 0));
free((char *) value);
void
expandnumeric(name)
char *name
PPCODE:
int value = rpmExpandNumeric(name);
mXPUSHs(newSViv(value));
void
addmacro(macro)
src/RPM4.xs view on Meta::CPAN
delMacro(NULL, name);
void
loadmacrosfile(filename)
char * filename
PPCODE:
rpmInitMacros(NULL, filename);
void
resetmacros()
PPCODE:
rpmFreeMacros(NULL);
void
resetrc()
PPCODE:
rpmFreeRpmrc();
void
getosname()
PREINIT:
const char *v = NULL;
PPCODE:
rpmGetOsInfo(&v, NULL);
mXPUSHs(newSVpv(v, 0));
void
getarchname()
PREINIT:
const char *v = NULL;
PPCODE:
rpmGetArchInfo(&v, NULL);
mXPUSHs(newSVpv(v, 0));
int
osscore(data, build = 0)
src/RPM4.xs view on Meta::CPAN
RETVAL
void
buildhost()
PREINIT:
PPCODE:
static char hostname[1024];
static int oneshot = 0;
struct hostent *hbn;
if (! oneshot) {
src/RPM4.xs view on Meta::CPAN
void
headernew()
PREINIT:
Header h = headerNew();
PPCODE:
mXPUSHs(sv_setref_pv(newSVpvs(""), bless_header, (void *)h));
#ifdef HDRPMMEM
PRINTF_NEW(bless_header, h, h->nrefs);
#endif
src/RPM4.xs view on Meta::CPAN
int no_header_magic
SV * callback
PREINIT:
FD_t fd;
Header header;
PPCODE:
if (fp && (fd = fdDup(fileno(fp)))) {
#ifdef HDLISTDEBUG
PRINTF_CALL;
#endif
if (callback != NULL && SvROK(callback)) {
src/RPM4.xs view on Meta::CPAN
char * filename
SV * sv_vsflags
PREINIT:
rpmts ts = rpmtsCreate();
rpmVSFlags vsflags = RPMVSF_DEFAULT;
PPCODE:
if (sv_vsflags == NULL) /* Nothing has been passed, default is no signature */
vsflags |= _RPMVSF_NOSIGNATURES;
else
vsflags = sv2vsflags(sv_vsflags);
rpmtsSetVSFlags(ts, vsflags);
src/RPM4.xs view on Meta::CPAN
char * filename
SV * sv_vsflags
PREINIT:
rpmts ts = rpmtsCreate();
rpmVSFlags vsflags = RPMVSF_DEFAULT;
PPCODE:
vsflags = sv2vsflags(sv_vsflags);
rpmtsSetVSFlags(ts, vsflags);
PUTBACK;
_installsrpms(ts, filename);
SPAGAIN;
src/RPM4.xs view on Meta::CPAN
void
Header_hsize(h, no_header_magic = 0)
Header h
int no_header_magic
PPCODE:
mXPUSHs(newSViv(headerSizeof(h, no_header_magic ? HEADER_MAGIC_NO : HEADER_MAGIC_YES)));
void
Header_copy(h)
Header h
PREINIT:
Header hcopy;
PPCODE:
hcopy = headerCopy(h);
mXPUSHs(sv_setref_pv(newSVpvs(""), bless_header, (void *)hcopy));
#ifdef HDRPMMEM
PRINTF_NEW(bless_header, hcopy, hcopy->nrefs);
#endif
src/RPM4.xs view on Meta::CPAN
#if defined(RPM4_18_0)
unsigned int hsize = 0;
#else
int hsize = 0;
#endif
PPCODE:
#if defined(RPM4_18_0)
string = headerExport(h, &hsize);
#else
hsize = headerSizeof(h, no_header_magic ? HEADER_MAGIC_NO : HEADER_MAGIC_YES);
string = headerUnload(h);
src/RPM4.xs view on Meta::CPAN
Header_listtag(h)
Header h
PREINIT:
HeaderIterator iterator;
struct rpmtd_s td;
PPCODE:
iterator = headerInitIterator(h);
while (headerNext(iterator, &td)) {
mXPUSHs(newSViv(rpmtdTag(&td)));
rpmtdFreeData(&td);
}
src/RPM4.xs view on Meta::CPAN
Header_tag(h, sv_tag)
Header h
SV * sv_tag
PREINIT:
rpmTag tag = -1;
PPCODE:
if (SvIOK(sv_tag)) {
tag = SvIV(sv_tag);
} else if (SvPOK(sv_tag)) {
tag = rpmTagGetValue(SvPV_nolen(sv_tag));
}
src/RPM4.xs view on Meta::CPAN
Header_queryformat(h, query)
Header h
char * query
PREINIT:
char *s = NULL;
PPCODE:
s = headerFormat(h, query,
NULL);
mXPUSHs(newSVpv(s, 0));
free(s);
src/RPM4.xs view on Meta::CPAN
Header h
ALIAS:
nevr= 1
PREINIT:
I32 gimme = GIMME_V;
PPCODE:
if (h) {
if (gimme == G_SCALAR) {
char *nvr = headerGetAsString(h, RPMTAG_NVR);
if (ix == 1) {
mXPUSHs(newSVpv(nvr, 0));
src/RPM4.xs view on Meta::CPAN
SV * type
int scaremem
PREINIT:
rpmds ds;
rpmTag tag;
PPCODE:
tag = sv2deptag(type);
ds = rpmdsNew(header, tag, scaremem);
ds = rpmdsInit(ds);
if (ds != NULL)
if (rpmdsNext(ds) >= 0) {
src/RPM4.xs view on Meta::CPAN
int scaremem
PREINIT:
rpmfi Files = NULL;
rpmts ts = NULL; /* NULL; setting this to NULL skip path relocation
* maybe a good deal is Header::Files(header, Dep = NULL) */
PPCODE:
#ifdef HDLISTDEBUG
PRINTF_CALL;
#endif
Files = rpmfiNew(ts, header, RPMTAG_BASENAMES, scaremem);
if (Files != NULL && (Files = rpmfiInit(Files, 0)) != NULL && rpmfiNext(Files) >= 0) {
src/RPM4.xs view on Meta::CPAN
SV * type
PREINIT:
rpmds ds = NULL;
rpmds pro = NULL;
rpmTag tag;
PPCODE:
tag = sv2deptag(type);
ds = rpmdsNew(h1, tag, SCAREMEM);
pro = rpmdsNew(h2, RPMTAG_PROVIDENAME, SCAREMEM);
#ifdef HDLISTDEBUG
fprintf(stderr, "HDEBUG: Header::hchkdep %d: %s vs %s %p\n", tag, hGetNEVR(h1, NULL), hGetNEVR(h2, NULL), ds);
src/RPM4.xs view on Meta::CPAN
#ifdef HHACK
void
emptydb()
PREINIT:
rpmts ts = rpmtsCreate();
PPCODE:
mXPUSHs(sv_setref_pv(newSVpvs(""), bless_rpmts, (void *)ts));
#ifdef HDRPMMEM
PRINTF_NEW(bless_rpmts, ts, ts->nrefs);
#endif
src/RPM4.xs view on Meta::CPAN
newdb(write = 0, rootdir = NULL)
int write
char * rootdir
PREINIT:
rpmts ts = rpmtsCreate();
PPCODE:
if (rootdir)
rpmtsSetRootDir(ts, rootdir);
rpmtsSetVSFlags(ts, RPMTRANS_FLAG_NONE);
/* is O_CREAT a good idea here ? */
src/RPM4.xs view on Meta::CPAN
Ts_new(perlclass, rootdir = NULL)
char * perlclass
char * rootdir
PREINIT:
rpmts ts = rpmtsCreate();
PPCODE:
rpmtsSetRootDir(ts, rootdir);
mXPUSHs(sv_setref_pv(newSVpvs(""), perlclass, (void *)ts));
void
Ts_DESTROY(ts)
src/RPM4.xs view on Meta::CPAN
rpmts ts
int off
PREINIT:
rpmdbMatchIterator mi;
Header header;
PPCODE:
mi = rpmtsInitIterator(ts, RPMDBI_PACKAGES, &off, sizeof(off));
if ((header = rpmdbNextIterator(mi)) != NULL) {
mXPUSHs(sv_setref_pv(newSVpvs(""), bless_header, headerLink(header)));
#ifdef HDRPMMEM
PRINTF_NEW(bless_header, header, header->nrefs);
src/RPM4.xs view on Meta::CPAN
RETVAL
void
Ts_transclean(ts)
rpmts ts
PPCODE:
rpmtsClean(ts);
int
Ts_transrun(ts, callback, ...)
rpmts ts
src/RPM4.xs view on Meta::CPAN
void
Ts__transpbs(ts)
rpmts ts
PREINIT:
rpmps ps;
PPCODE:
ps = rpmtsProblems(ts);
if (ps && rpmpsNumProblems(ps)) /* if no problem, return undef */
mXPUSHs(sv_setref_pv(newSVpvs(""), bless_rpmps, ps));
int
src/RPM4.xs view on Meta::CPAN
char * filename
SV * sv_vsflags
PREINIT:
rpmVSFlags vsflags = RPMVSF_DEFAULT;
rpmVSFlags oldvsflags = RPMVSF_DEFAULT;
PPCODE:
oldvsflags = rpmtsVSFlags(ts); /* keep track of old settings */
if (sv_vsflags != NULL) {
vsflags = sv2vsflags(sv_vsflags);
rpmtsSetVSFlags(ts, vsflags);
}
src/RPM4.xs view on Meta::CPAN
rpmtsSetVSFlags(ts, oldvsflags); /* resetting in case of change */
void
Ts_transreset(ts)
rpmts ts
PPCODE:
rpmtsEmpty(ts);
rpmtsSetRootDir(ts, "/");
# Remaping function:
# RPM4::rpm2header(filename); # Reusing existing RPM4::Transaction
void
Ts_rpm2header(ts, filename)
rpmts ts
char * filename
PPCODE:
_rpm2header(ts, filename, 0);
SPAGAIN;
# RPM4::Spec::specbuild([ buildflags ]); Reusing existing RPM4::Transaction
int
src/RPM4.xs view on Meta::CPAN
void
Ts_installsrpm(ts, filename)
rpmts ts
char * filename
PPCODE:
PUTBACK;
_installsrpms(ts, filename);
SPAGAIN;
MODULE = RPM4 PACKAGE = RPM4::Db::Te PREFIX = Te_
src/RPM4.xs view on Meta::CPAN
RETVAL
void
Te_name(Te)
rpmte Te
PPCODE:
mXPUSHs(newSVpv(rpmteN(Te), 0));
void
Te_version(Te)
rpmte Te
PPCODE:
mXPUSHs(newSVpv(rpmteV(Te), 0));
void
Te_release(Te)
rpmte Te
PPCODE:
mXPUSHs(newSVpv(rpmteR(Te), 0));
void
Te_epoch(Te)
rpmte Te
PPCODE:
mXPUSHs(newSVpv(rpmteE(Te), 0));
void
Te_arch(Te)
rpmte Te
PPCODE:
mXPUSHs(newSVpv(rpmteA(Te), 0));
void
Te_os(Te)
rpmte Te
PPCODE:
mXPUSHs(newSVpv(rpmteO(Te), 0));
void
Te_fullname(Te)
rpmte Te
PREINIT:
I32 gimme = GIMME_V;
PPCODE:
if (gimme == G_SCALAR) {
mXPUSHs(newSVpvf("%s-%s-%s.%s",
rpmteN(Te), rpmteV(Te), rpmteR(Te), rpmteA(Te)));
} else {
mXPUSHs(newSVpv(rpmteN(Te), 0));
src/RPM4.xs view on Meta::CPAN
}
void
Te_size(Te)
rpmte Te
PPCODE:
mXPUSHs(newSVuv(rpmtePkgFileSize(Te)));
void
Te_dep(Te, type)
rpmte Te
SV * type
PREINIT:
rpmds ds;
rpmTag tag;
PPCODE:
tag = sv2deptag(type);
ds = rpmteDS(Te, tag);
if (ds != NULL)
if (rpmdsNext(ds) >= 0) {
mXPUSHs(sv_setref_pv(newSVpvs(""), bless_rpmds, ds));
src/RPM4.xs view on Meta::CPAN
PREINIT:
#if defined(RPM4_12_0)
rpmfiles Files;
#endif
rpmfi fi;
PPCODE:
#if defined(RPM4_12_0)
Files = rpmteFiles(Te);
fi = rpmfilesIter(Files, RPMFI_ITER_FWD);
if (fi != NULL && rpmfiNext(fi) >= 0) {
#else
src/RPM4.xs view on Meta::CPAN
newdep(sv_depTag, Name, sv_sense = NULL, sv_evr = NULL)
SV * sv_depTag
char * Name
SV * sv_evr
SV * sv_sense
PPCODE:
PUTBACK;
_newdep(sv_depTag, Name, sv_sense, sv_evr);
SPAGAIN;
void
rpmlibdep()
PREINIT:
rpmds Dep = NULL;
PPCODE:
#if 0
rpmds next;
const char ** provNames;
int * provFlags;
const char ** provVersions;
src/RPM4.xs view on Meta::CPAN
char * perlclass
SV * sv_tag
char * name
SV * sv_sense
SV * sv_evr
PPCODE:
PUTBACK;
_newdep(sv_tag, name, sv_sense, sv_evr);
SPAGAIN;
void
src/RPM4.xs view on Meta::CPAN
Dep_info(Dep)
rpmds Dep
PREINIT:
rpmsenseFlags flag;
I32 gimme = GIMME_V;
PPCODE:
#ifdef HDLISTDEBUG
PRINTF_CALL;
#endif
CHECK_RPMDS_IX(Dep);
if (gimme == G_SCALAR) {
src/RPM4.xs view on Meta::CPAN
}
void
Dep_tag(Dep)
rpmds Dep
PPCODE:
mXPUSHs(newSViv(rpmdsTagN(Dep)));
void
Dep_name(Dep)
rpmds Dep
PPCODE:
#ifdef HDLISTDEBUG
PRINTF_CALL;
#endif
CHECK_RPMDS_IX(Dep);
mXPUSHs(newSVpv(rpmdsN(Dep), 0));
void
Dep_flags(Dep)
rpmds Dep
PPCODE:
CHECK_RPMDS_IX(Dep);
mXPUSHs(newSViv(rpmdsFlags(Dep)));
void
Dep_evr(Dep)
rpmds Dep
PPCODE:
CHECK_RPMDS_IX(Dep);
mXPUSHs(newSVpv(rpmdsEVR(Dep), 0));
#ifndef RPM4_19_0
int
src/RPM4.xs view on Meta::CPAN
MODULE = RPM4 PACKAGE = RPM4::Header::Files PREFIX = Files_
void
Files_DESTROY(Files)
rpmfi Files
PPCODE:
#ifdef HDRPMMEM
PRINTF_FREE(bless_rpmfi, Files, Files->nrefs);
#endif
Files = rpmfiFree(Files);
src/RPM4.xs view on Meta::CPAN
#endif
void
Files_filename(Files)
rpmfi Files
PPCODE:
#ifdef HDLISTDEBUG
PRINTF_CALL;
fprintf(stderr, "File %s", rpmfiFN(Files));
#endif
mXPUSHs(newSVpv(rpmfiFN(Files), 0));
void
Files_dirname(Files)
rpmfi Files
PPCODE:
mXPUSHs(newSVpv(rpmfiDN(Files), 0));
void
Files_basename(Files)
rpmfi Files
PPCODE:
mXPUSHs(newSVpv(rpmfiBN(Files), 0));
void
Files_fflags(Files)
rpmfi Files
PPCODE:
mXPUSHs(newSViv(rpmfiFFlags(Files)));
void
Files_mode(Files)
rpmfi Files
PPCODE:
mXPUSHs(newSVuv(rpmfiFMode(Files)));
void
Files_md5(Files)
rpmfi Files
PREINIT:
const char * md5;
PPCODE:
if ((md5 =
rpmfiFDigestHex(Files, NULL)
) != NULL && *md5 != 0 /* return undef if empty */) {
mXPUSHs(newSVpv(md5, 0));
}
src/RPM4.xs view on Meta::CPAN
void
Files_link(Files)
rpmfi Files
PREINIT:
const char * link;
PPCODE:
if ((link = rpmfiFLink(Files)) != NULL && *link != 0 /* return undef if empty */) {
mXPUSHs(newSVpv(link, 0));
}
void
Files_user(Files)
rpmfi Files
PPCODE:
mXPUSHs(newSVpv(rpmfiFUser(Files), 0));
void
Files_group(Files)
rpmfi Files
PPCODE:
mXPUSHs(newSVpv(rpmfiFGroup(Files), 0));
void
Files_inode(Files)
rpmfi Files
PPCODE:
mXPUSHs(newSViv(rpmfiFInode(Files)));
void
Files_size(Files)
rpmfi Files
PPCODE:
mXPUSHs(newSViv(rpmfiFSize(Files)));
void
Files_dev(Files)
rpmfi Files
PPCODE:
mXPUSHs(newSViv(rpmfiFRdev(Files)));
void
Files_color(Files)
rpmfi Files
PPCODE:
mXPUSHs(newSViv(rpmfiFColor(Files)));
void
Files_class(Files)
rpmfi Files
PREINIT:
const char * class;
PPCODE:
if ((class = rpmfiFClass(Files)) != NULL)
mXPUSHs(newSVpv(rpmfiFClass(Files), 0));
void
Files_mtime(Files)
rpmfi Files
PPCODE:
mXPUSHs(newSViv(rpmfiFMtime(Files)));
void
Files_nlink(Files)
rpmfi Files
PPCODE:
mXPUSHs(newSViv(rpmfiFNlink(Files)));
MODULE = RPM4 PACKAGE = RPM4
void
src/RPM4.xs view on Meta::CPAN
char * filename
SV * anyarch
SV * force
PREINIT:
rpmts ts = rpmtsCreate();
PPCODE:
PUTBACK;
_newspec(ts, filename, anyarch, force);
ts = rpmtsFree(ts);
SPAGAIN;
src/RPM4.xs view on Meta::CPAN
PREINIT:
rpmts ts = NULL;
SV * anyarch = 0;
SV * force = 0;
int i;
PPCODE:
for(i=2; i < items; i++) {
if(strcmp(SvPV_nolen(ST(i)), "transaction") == 0) {
i++;
if (sv_isobject(ST(i)) && (SvTYPE(SvRV(ST(i))) == SVt_PVMG)) {
ts = (rpmts)SvIV((SV*)SvRV(ST(i)));
src/RPM4.xs view on Meta::CPAN
rpmSpecFree(spec);
void
Spec_srcheader(spec)
rpmSpec spec
PPCODE:
Header header = rpmSpecSourceHeader(spec);
mXPUSHs(sv_setref_pv(newSVpvs(""), bless_header, (void *)headerLink(header)));
void
Spec_binheader(spec)
rpmSpec spec
PREINIT:
Package pkg;
PPCODE:
rpmSpecPkgIter iter = rpmSpecPkgIterInit(spec);
while ((pkg = rpmSpecPkgIterNext(iter)) != NULL)
mXPUSHs(sv_setref_pv(newSVpvs(""), bless_header, (void *)headerLink(rpmSpecPkgHeader(pkg))));
void
Spec_srcrpm(spec)
rpmSpec spec
PREINIT:
Header header = NULL;
PPCODE:
header = rpmSpecSourceHeader(spec);
struct rpmtd_s td;
int no_src = headerGet(header, RPMTAG_NOSOURCE, &td, HEADERGET_MINMEM);
char *nvr = headerGetAsString(header, RPMTAG_NVR);
mXPUSHs(newSVpvf("%s/%s.%ssrc.rpm",
src/RPM4.xs view on Meta::CPAN
Package pkg;
char * binFormat;
char * binRpm;
char * path;
Header header;
PPCODE:
rpmSpecPkgIter iter = rpmSpecPkgIterInit(spec);
while ((pkg = rpmSpecPkgIterNext(iter)) != NULL) {
/* headerCopyTags(h, pkg->header, copyTags); */
binFormat = rpmGetPath("%{_rpmfilename}", NULL);
header = rpmSpecSourceHeader(spec);
src/RPM4.xs view on Meta::CPAN
Spec_check(spec, ts = NULL)
rpmSpec spec
PREINIT:
rpmts ts = rpmtsCreate();
rpmps ps;
PPCODE:
PUTBACK;
if (ts)
ts = rpmtsLink(ts);
else
ts = rpmtsCreate();
src/RPM4.xs view on Meta::CPAN
Spec_sources(spec, is = 0)
rpmSpec spec
int is
PREINIT:
rpmSpecSrc srcPtr;
PPCODE:
rpmSpecSrcIter iter = rpmSpecSrcIterInit(spec);
while ((srcPtr = rpmSpecSrcIterNext(iter)) != NULL) {
if (is && !(rpmSpecSrcFlags(srcPtr) & is))
continue;
mXPUSHs(newSVpv(rpmSpecSrcFilename(srcPtr, 0), 0));
src/RPM4.xs view on Meta::CPAN
Spec_sources_url(spec, is = 0)
rpmSpec spec
int is
PREINIT:
rpmSpecSrc srcPtr;
PPCODE:
rpmSpecSrcIter iter = rpmSpecSrcIterInit(spec);
while ((srcPtr = rpmSpecSrcIterNext(iter)) != NULL) {
if (is && !(rpmSpecSrcFlags(srcPtr) & is))
continue;
mXPUSHs(newSVpv(rpmSpecSrcFilename(srcPtr, 1), 0));
src/RPM4.xs view on Meta::CPAN
ps_new(perlclass, ts)
char * perlclass
rpmts ts
PREINIT:
rpmps ps;
PPCODE:
ps = rpmtsProblems(ts);
if (ps && rpmpsNumProblems(ps)) /* if no problem, return undef */
mXPUSHs(sv_setref_pv(newSVpvs(""), bless_rpmps, ps));
void
ps_DESTROY(ps)
rpmps ps
PPCODE:
ps = rpmpsFree(ps);
int
ps_count(ps)
rpmps ps
src/RPM4.xs view on Meta::CPAN
void
ps_print(ps, fp)
rpmps ps
FILE *fp
PPCODE:
rpmpsPrint(fp, ps);
int
ps_isignore(ps, numpb)
rpmps ps
view all matches for this distribution
view release on metacpan or search on metacpan
lib/rperloptions.pm view on Meta::CPAN
our $input_file_names = my string_arrayref $TYPED_input_file_names = [];
our $output_file_name_prefixes = my string_arrayref $TYPED_output_file_name_prefixes = [];
our $output_file_name_groups = my hashref_arrayref $TYPED_output_file_name_groups = [];
our $modes = my string_hashref $TYPED_modes = {}; # can't store defaults here, erased by GetOptions()
our $modes_default = my string_hashref $TYPED_modes_default = { # default to CPPCODE_CPPOPS_CPPTYPES_CHECKTRACE_SUBCOMPILE_EXECUTE_LABEL in C++ output code
dependencies => 'ON',
magic => 'LOW',
code => 'CPP',
ops => 'CPP',
types => 'CPP',
view all matches for this distribution
view release on metacpan or search on metacpan
MCP23017.xs view on Meta::CPAN
void
GPIO_clean (fd)
int fd
PREINIT:
I32* temp;
PPCODE:
temp = PL_markstack_ptr++;
GPIO_clean(fd);
if (PL_markstack_ptr != temp) {
PL_markstack_ptr = temp;
XSRETURN_EMPTY;
view all matches for this distribution
view release on metacpan or search on metacpan
int fd
int reg
int bit
PREINIT:
I32* temp;
PPCODE:
temp = PL_markstack_ptr++;
disableRegisterBit(fd, reg, bit);
if (PL_markstack_ptr != temp) {
PL_markstack_ptr = temp;
XSRETURN_EMPTY;
int fd
int reg
int bit
PREINIT:
I32* temp;
PPCODE:
temp = PL_markstack_ptr++;
enableRegisterBit(fd, reg, bit);
if (PL_markstack_ptr != temp) {
PL_markstack_ptr = temp;
XSRETURN_EMPTY;
view all matches for this distribution
view release on metacpan or search on metacpan
PREINIT:
char *buf;
int got = 0;
int flags;
int result;
PPCODE:
if (nbytes < 0)
croak("tty_gets: nbytes must be a non-negative integer");
/* tty_open() opens with O_NDELAY (non-blocking), which defeats the
port's VMIN/VTIME read timeout. Clear it so a read blocks up to
that timeout instead of returning EAGAIN immediately. */
view all matches for this distribution
view release on metacpan or search on metacpan
void
connect(class)
PREINIT:
char msgBuf[MAX_RESULT_MSG_SIZE];
PPCODE:
Sd_ApiInit("","","1", msgBuf, MAX_RESULT_MSG_SIZE);
SV *
_fetch_users(class, field, type, value)
int field
view all matches for this distribution
view release on metacpan or search on metacpan
MODULE = Rc PACKAGE = Rc::UnaryCmd
void
Node::kids()
PPCODE:
XPUSHs(node_2sv(THIS->u[0].p));
Node *
Node::kid(xx)
int xx;
MODULE = Rc PACKAGE = Rc::BinCmd
void
Node::kids()
PPCODE:
XPUSHs(node_2sv(THIS->u[0].p));
XPUSHs(node_2sv(THIS->u[1].p));
Node *
Node::kid(xx)
MODULE = Rc PACKAGE = Rc::Forin
void
Node::kids()
PPCODE:
XPUSHs(node_2sv(THIS->u[0].p));
XPUSHs(node_2sv(THIS->u[1].p));
XPUSHs(node_2sv(THIS->u[2].p));
Node *
char *
Node::redir()
PREINIT:
char *str;
PPCODE:
switch(THIS->u[0].i) {
case rFrom: str="<"; break;
case rCreate: str=">"; break;
case rAppend: str=">>"; break;
case rHeredoc: str="<<"; break;
MODULE = Rc PACKAGE = Rc::Dup
int
Node::left()
PPCODE:
XPUSHs(sv_2mortal(newSViv(THIS->u[1].i)));
int
Node::right()
PPCODE:
XPUSHs(sv_2mortal(newSViv(THIS->u[2].i)));
MODULE = Rc PACKAGE = Rc::Redir
int
Node::fd()
PPCODE:
XPUSHs(sv_2mortal(newSViv(THIS->u[1].i)));
Node *
Node::targ()
CODE:
MODULE = Rc PACKAGE = Rc::Pipe
void
Node::fds()
PPCODE:
XPUSHs(sv_2mortal(newSViv(THIS->u[0].i)));
XPUSHs(sv_2mortal(newSViv(THIS->u[1].i)));
void
Node::kids()
PPCODE:
XPUSHs(node_2sv(THIS->u[2].p));
XPUSHs(node_2sv(THIS->u[3].p));
Node *
Node::kid(xx)
view all matches for this distribution
view release on metacpan or search on metacpan
INIT:
struct dirent *ent;
DIR* dir;
SV* record[3];
AV *entry, *ret_val;
PPCODE:
dir = opendir(dirname);
if (dir) {
while ((ent=readdir(dir))) {
record[0] = newSVpv(ent->d_name, 0);
record[1] = newSViv((IV)ent->d_ino);
INIT:
struct dirent *ent;
DIR* dir;
AV *entry, *ret_val;
HV* hash;
PPCODE:
dir = opendir(dirname);
hash = newHV();
if (dir) {
while ((ent = readdir(dir))) {
view all matches for this distribution
view release on metacpan or search on metacpan
src/Fast.xs view on Meta::CPAN
char** argv;
size_t* argvlen;
STRLEN len;
int argc, i;
SV* cb;
PPCODE:
if (!self->acc) {
croak("Not connected to any server");
}
cb = ST(items - 1);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Redis/Jet.xs view on Meta::CPAN
SV *
get_server(self)
Redis_Jet * self
PREINIT:
PPCODE:
XPUSHs(self->server);
double
get_connect_timeout(self)
lib/Redis/Jet.xs view on Meta::CPAN
/* response */
ssize_t readed;
ssize_t parse_offset;
ssize_t parsed_response;
long int parse_result;
PPCODE:
/* init */
if ( self->request_buf_len == 0 ) {
Newx(self->request_buf, REQUEST_BUF_SIZE, char);
self->request_buf_len = REQUEST_BUF_SIZE;
}
view all matches for this distribution
view release on metacpan or search on metacpan
rdb_parser_callbacks(parser)
RDB_parser *parser;
PREINIT:
int i, len;
SV **ptr;
PPCODE:
len = 1 + av_len(parser->callbacks);
if (GIMME_V != G_ARRAY) {
XPUSHs(sv_2mortal(newSViv(len)));
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
INSTALL( is_blessed_refref, "blessed REF" )
}
SV *
_using_custom_ops()
PPCODE:
/* This is provided for the test suite; do not use it. */
/* Use if-else below because ternary operator cannot build on Sun
Studio 11 and 12. */
if (USE_CUSTOM_OPS) {
XSRETURN_YES;
view all matches for this distribution
view release on metacpan or search on metacpan
MY_CXT.empty_hv = newHV();
}
void
rx_RE_FIELDS_MAGIC(...)
PPCODE:
#ifdef RE_FIELDS_MAGIC
XSRETURN_YES;
#else
XSRETURN_NO;
#endif
Regexp::Fields::tie::curpm_map = 1
INIT:
dMY_CXT;
REGEXP *rx;
HV *hv = Nullhv;
PPCODE:
if (PL_curpm && (rx = PM_GETRE(PL_curpm)))
hv = rx_get_names(aTHX_ rx, FALSE);
if (!hv)
hv = MY_CXT.empty_hv;
XPUSHs(sv_2mortal(newRV_inc((SV*) hv)));
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:
/* 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
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
RenderMan.xs view on Meta::CPAN
######################################################################
void
RiBSplineBasis()
PPCODE:
{
EXTEND(sp,16);
PUSHs(sv_2mortal(newSVnv(RiBSplineBasis[0][0])));
PUSHs(sv_2mortal(newSVnv(RiBSplineBasis[0][1])));
PUSHs(sv_2mortal(newSVnv(RiBSplineBasis[0][2])));
RenderMan.xs view on Meta::CPAN
PUSHs(sv_2mortal(newSVnv(RiBSplineBasis[3][3])));
}
void
RiBezierBasis()
PPCODE:
{
EXTEND(sp,16);
PUSHs(sv_2mortal(newSVnv(RiBezierBasis[0][0])));
PUSHs(sv_2mortal(newSVnv(RiBezierBasis[0][1])));
PUSHs(sv_2mortal(newSVnv(RiBezierBasis[0][2])));
RenderMan.xs view on Meta::CPAN
PUSHs(sv_2mortal(newSVnv(RiBezierBasis[3][3])));
}
void
RiCatmullRomBasis()
PPCODE:
{
EXTEND(sp,16);
PUSHs(sv_2mortal(newSVnv(RiCatmullRomBasis[0][0])));
PUSHs(sv_2mortal(newSVnv(RiCatmullRomBasis[0][1])));
PUSHs(sv_2mortal(newSVnv(RiCatmullRomBasis[0][2])));
RenderMan.xs view on Meta::CPAN
PUSHs(sv_2mortal(newSVnv(RiCatmullRomBasis[3][3])));
}
void
RiHermiteBasis()
PPCODE:
{
EXTEND(sp,16);
PUSHs(sv_2mortal(newSVnv(RiHermiteBasis[0][0])));
PUSHs(sv_2mortal(newSVnv(RiHermiteBasis[0][1])));
PUSHs(sv_2mortal(newSVnv(RiHermiteBasis[0][2])));
RenderMan.xs view on Meta::CPAN
PUSHs(sv_2mortal(newSVnv(RiHermiteBasis[3][3])));
}
void
RiPowerBasis()
PPCODE:
{
EXTEND(sp,16);
PUSHs(sv_2mortal(newSVnv(RiPowerBasis[0][0])));
PUSHs(sv_2mortal(newSVnv(RiPowerBasis[0][1])));
PUSHs(sv_2mortal(newSVnv(RiPowerBasis[0][2])));
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 OptionCode;
PREINIT:
int optionValue;
int* optionPointer;
int retval;
PPCODE:
optionPointer = &optionValue;
retval = sslGetProperty(Channel, (SSL_OPTION_CODE)OptionCode, optionPointer);
EXTEND(SP, 2);
PUSHs(sv_2mortal(newSViv(retval)));
PUSHs(sv_2mortal(newSViv(optionValue)));
view all matches for this distribution
view release on metacpan or search on metacpan
lib/RocksDB.xs view on Meta::CPAN
OUTPUT:
RETVAL
void
RocksDB::DB::get_live_files_meta_data()
PPCODE:
std::vector<rocksdb::LiveFileMetaData> metadata;
THIS->db->GetLiveFilesMetaData(&metadata);
for (std::vector<rocksdb::LiveFileMetaData>::size_type i = 0; i < metadata.size(); i++) {
rocksdb::LiveFileMetaData data = metadata[i];
HV *hv = newHV();
lib/RocksDB.xs view on Meta::CPAN
mXPUSHs(newRV_noinc((SV*) hv));
}
void
RocksDB::DB::get_sorted_wal_files()
PPCODE:
rocksdb::VectorLogPtr files;
CROAK_ON_ERROR(THIS->db->GetSortedWalFiles(files));
for (std::vector<std::unique_ptr<rocksdb::LogFile>>::size_type i = 0; i < files.size(); i++) {
HV* hv = newHV();
std::string path_name = files[i]->PathName();
lib/RocksDB.xs view on Meta::CPAN
INIT:
CHECK_ITER_VALID(THIS);
void
rocksdb::Iterator::each()
PPCODE:
if (!THIS->Valid())
XSRETURN_EMPTY;
rocksdb::Slice key = THIS->key(), value = THIS->value();
mXPUSHs(newSVpvn(key.data(), key.size()));
mXPUSHs(newSVpvn(value.data(), value.size()));
THIS->Next();
void
rocksdb::Iterator::reverse_each()
PPCODE:
if (!THIS->Valid())
XSRETURN_EMPTY;
rocksdb::Slice key = THIS->key(), value = THIS->value();
mXPUSHs(newSVpvn(key.data(), key.size()));
mXPUSHs(newSVpvn(value.data(), value.size()));
view all matches for this distribution
view release on metacpan or search on metacpan
local/lib/perl5/x86_64-linux-thread-multi/Glib/GenPod.pm view on Meta::CPAN
at any point in this pod -- they are stripped after.
In fact, any pod is valid in here, until the =cut.
=cut
void foo (...)
PPCODE:
/* crazy code follows */
=item =for arg name (type) description
=item =for arg name description
local/lib/perl5/x86_64-linux-thread-multi/Glib/GenPod.pm view on Meta::CPAN
? (@outlist > 1
? "(".join (", ", @outlist).")"
: $outlist[0]
)." = "
: (defined $xsub->{codetype} and
$xsub->{codetype} eq 'PPCODE'
? 'list = '
: ''
);
"$retstr$call ".($argstr ? "($argstr)" : "");
view all matches for this distribution