/[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 37 by dpavlin, Sun Sep 21 20:16:39 2008 UTC revision 39 by dpavlin, Sat Feb 14 17:34:01 2009 UTC
# Line 675  PPCODE: Line 675  PPCODE:
675          XSRETURN(1);          XSRETURN(1);
676    
677    
678    void
679    tcjdbsearch2(jdb, word)
680            void *  jdb
681            SV *    word
682    PREINIT:
683            AV *av;
684            STRLEN wsize;
685            uint64_t *results;
686            const char *wbuf;
687            int i, rnum;
688    PPCODE:
689            wbuf = SvPV(word, wsize);
690            results = tcjdbsearch2(jdb, wbuf, &rnum);
691            if ( rnum > 0 ) {
692              av = newAV();
693              for(i = 0; i < rnum; i++){
694                av_push(av, newSViv( (int)results[i] ));
695              }
696              XPUSHs(sv_2mortal(newRV_noinc((SV *)av)));
697            } else {
698              XPUSHs((SV *)&PL_sv_undef);
699            }
700            XSRETURN(1);
701    
702    
703  int  int
704  tcjdbsync(jdb)  tcjdbsync(jdb)
705          void *  jdb          void *  jdb

Legend:
Removed from v.37  
changed lines
  Added in v.39

  ViewVC Help
Powered by ViewVC 1.1.26