/[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 11 by dpavlin, Sun Aug 17 23:57:02 2008 UTC revision 17 by dpavlin, Mon Aug 18 17:45:56 2008 UTC
# Line 99  CODE: Line 99  CODE:
99  OUTPUT:  OUTPUT:
100          RETVAL          RETVAL
101    
102    
103    int
104    tcidbput(idb, id, val)
105            void *  idb
106            int     id
107            SV *    val
108    PREINIT:
109            STRLEN vsiz;
110            const char *vbuf;
111    CODE:
112            vbuf = SvPV(val, vsiz);
113            RETVAL = tcidbput(idb, id, vbuf);
114    OUTPUT:
115            RETVAL
116    
117    
118    int
119    tcidbout(idb, id)
120            void *  idb
121            int     id
122    CODE:
123            RETVAL = tcidbout(idb, id);
124    OUTPUT:
125            RETVAL
126    
127    
128    void
129    tcidbget(idb, id)
130            void *  idb
131            int     id
132    PREINIT:
133            char *vbuf;
134    PPCODE:
135            vbuf = tcidbget(idb, id);
136            if(vbuf){
137              XPUSHs(sv_2mortal(newSVpvn(vbuf, strlen(vbuf))));
138              tcfree(vbuf);
139            } else {
140              XPUSHs((SV *)&PL_sv_undef);
141            }
142            XSRETURN(1);
143    

Legend:
Removed from v.11  
changed lines
  Added in v.17

  ViewVC Help
Powered by ViewVC 1.1.26