/[Search-TokyoDystopia]/TokyoDystopia.xs
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /TokyoDystopia.xs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 21 by dpavlin, Mon Aug 18 18:48:33 2008 UTC revision 22 by dpavlin, Mon Aug 18 18:53:39 2008 UTC
# Line 168  PPCODE: Line 168  PPCODE:
168          XSRETURN(1);          XSRETURN(1);
169    
170    
171    void
172    tcidbsearch2(idb, expr)
173            void *  idb
174            SV *    expr
175    PREINIT:
176            AV *av;
177            STRLEN wsize;
178            uint64_t *results;
179            const char *wbuf;
180            int i, rnum;
181    PPCODE:
182            wbuf = SvPV(expr, wsize);
183            results = tcidbsearch2(idb, wbuf, &rnum);
184            if ( rnum > 0 ) {
185              av = newAV();
186              for(i = 0; i < rnum; i++){
187                av_push(av, newSViv( (int)results[i] ));
188              }
189              XPUSHs(sv_2mortal(newRV_noinc((SV *)av)));
190            } else {
191              XPUSHs((SV *)&PL_sv_undef);
192            }
193            XSRETURN(1);
194    
195    
196  int  int
197  tcidbiterinit(idb)  tcidbiterinit(idb)
198          void *  idb          void *  idb

Legend:
Removed from v.21  
changed lines
  Added in v.22

  ViewVC Help
Powered by ViewVC 1.1.26