XPUSHs(sv_2mortal(newSViv( timelimit )));
XPUSHs(sv_2mortal(newSViv( attrsonly )));
- for ( an = attrs; an; an = an->an_next ) {
+ for ( an = attrs; an && an->an_name.bv_val; an++ ) {
XPUSHs(sv_2mortal(newSVpv( an->an_name.bv_val , 0)));
}
PUTBACK;
{
bsi->attrs=(char**)ch_calloc(1,sizeof(char*));
bsi->attrs[0]=NULL;
- for(p=attrs;p!=NULL;p=p->an_next)
+ for(p=attrs;p->an_name.bv_val;p++)
backsql_attrlist_add(bsi,p->an_name.bv_val);
}
else
return (-1);
}
- for (i = 0, an = attrs; an != NULL; an=an->an_next, i++);
+ for (i = 0, an = attrs; an && an->an_name.bv_val; an++, i++);
if (i > 0) {
sattrs = ch_malloc( (i+1) * sizeof(char *));
- for (i = 0, an = attrs; an; an=an->an_next, i++)
+ for (i = 0, an = attrs; an->an_name.bv_val; an++, i++)
sattrs[i] = an->an_name.bv_val;
sattrs[i] = NULL;
attrs_tcl = Tcl_Merge (i, sattrs);