| 1 |
|
| #include "tietv.h" |
| 2 |
|
| |
| 3 |
|
| #ifdef USING_TV_ARG |
| 4 |
|
| # define MYOBJ_ 0, |
| 5 |
|
| #else |
| 6 |
|
| # define MYOBJ_ |
| 7 |
|
| #endif |
| 8 |
|
| |
| 9 |
|
| XPVTC *tv_global; |
| 10 |
|
| static int Unique=1; |
| 11 |
|
| |
| 12 |
|
| MODULE = Tree::Fat PACKAGE = Tree::Fat |
| 13 |
|
| |
| 14 |
|
| BOOT: |
| 15 |
7 |
| tv_global = init_tc((XPVTC*) safemalloc(sizeof(XPVTC))); |
| 16 |
|
| |
| 17 |
|
| PROTOTYPES: ENABLE |
| 18 |
|
| |
| 19 |
|
| |
| 20 |
|
| void |
| 21 |
|
| debug(mask) |
| 22 |
|
| int mask |
| 23 |
|
| CODE: |
| 24 |
0 |
| tv_set_debug(mask); |
| 25 |
|
| |
| 26 |
|
| void |
| 27 |
|
| unique(CLASS, un) |
| 28 |
|
| char *CLASS |
| 29 |
|
| int un; |
| 30 |
|
| CODE: |
| 31 |
8 |
| Unique = un; |
| 32 |
|
| |
| 33 |
|
| void |
| 34 |
|
| new(CLASS) |
| 35 |
|
| char *CLASS; |
| 36 |
|
| PREINIT: |
| 37 |
|
| XPVTV *tv; |
| 38 |
|
| PPCODE: |
| 39 |
22 |
| tv = init_tv((XPVTV*) safemalloc(sizeof(XPVTV))); |
| 40 |
22 |
▶ | XPUSHs(sv_setref_pv(sv_newmortal(), CLASS, tv)); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_setref_pv(sv_newmortal(), CLASS, tv)); |
0 |
22 |
22 |
|
| 41 |
|
| |
| 42 |
|
| void |
| 43 |
|
| XPVTV::DESTROY() |
| 44 |
|
| CODE: |
| 45 |
22 |
| tiefree_tv(THIS); |
| 46 |
|
| |
| 47 |
|
| SV * |
| 48 |
|
| XPVTV::FETCH(key) |
| 49 |
|
| char *key |
| 50 |
|
| PREINIT: |
| 51 |
|
| SV **out; |
| 52 |
|
| CODE: |
| 53 |
4 |
| tc_refocus(tv_global, THIS); |
| 54 |
4 |
| RETVAL = &PL_sv_undef; |
| 55 |
4 |
▶ | if (tietc_seek(tv_global, key, Unique)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (tietc_seek(tv_global, key, Unique)) { |
0 |
4 |
4 |
|
| 56 |
0 |
| key = tietc_fetch(tv_global, &out); |
| 57 |
0 |
| RETVAL = *out; |
| 58 |
|
| } |
| 59 |
4 |
| tc_refocus(tv_global, 0); |
| 60 |
|
| OUTPUT: |
| 61 |
|
| RETVAL |
| 62 |
|
| |
| 63 |
|
| void |
| 64 |
|
| XPVTV::insert(key, data) |
| 65 |
|
| char *key |
| 66 |
|
| SV *data |
| 67 |
|
| CODE: |
| 68 |
17622 |
| tc_refocus(tv_global, THIS); |
| 69 |
17622 |
| tietc_seek(tv_global, key, Unique); |
| 70 |
17622 |
| tietc_insert(MYOBJ_ tv_global, key, &data); |
| 71 |
17622 |
| tc_refocus(tv_global, 0); |
| 72 |
|
| |
| 73 |
|
| void |
| 74 |
|
| XPVTV::STORE(key, val) |
| 75 |
|
| char *key |
| 76 |
|
| SV *val |
| 77 |
|
| PREINIT: |
| 78 |
0 |
| XPVTC *tc = tv_global; |
| 79 |
|
| CODE: |
| 80 |
0 |
| tc_refocus(tc,THIS); |
| 81 |
0 |
▶ | if (tietc_seek(tc,key, Unique)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (tietc_seek(tc,key, Unique)) { |
0 |
0 |
0 |
|
| 82 |
0 |
| tietc_store(MYOBJ_ tc,&val); |
| 83 |
|
| } else { |
| 84 |
0 |
| tietc_insert(MYOBJ_ tc,key,&val); |
| 85 |
|
| } |
| 86 |
0 |
| tc_refocus(tv_global, 0); |
| 87 |
|
| |
| 88 |
|
| void |
| 89 |
|
| XPVTV::DELETE(key) |
| 90 |
|
| char *key |
| 91 |
|
| CODE: |
| 92 |
2012 |
| tc_refocus(tv_global, THIS); |
| 93 |
2012 |
| tietc_seek(tv_global, key, Unique); |
| 94 |
2012 |
| tietc_delete(MYOBJ_ tv_global); |
| 95 |
2012 |
| tc_refocus(tv_global, 0); |
| 96 |
|
| |
| 97 |
|
| int |
| 98 |
|
| XPVTV::compress(margin) |
| 99 |
|
| int margin |
| 100 |
|
| CODE: |
| 101 |
4 |
| tc_refocus(tv_global, THIS); |
| 102 |
4 |
| RETVAL = tietv_compress(MYOBJ_ tv_global, margin); |
| 103 |
4 |
| tc_refocus(tv_global, 0); |
| 104 |
|
| OUTPUT: |
| 105 |
|
| RETVAL |
| 106 |
|
| |
| 107 |
|
| int |
| 108 |
|
| XPVTV::balance(loose) |
| 109 |
|
| int loose |
| 110 |
|
| CODE: |
| 111 |
2 |
| tc_refocus(tv_global, THIS); |
| 112 |
2 |
| RETVAL = tv_balance(tv_global, loose); |
| 113 |
2 |
| tc_refocus(tv_global, 0); |
| 114 |
|
| OUTPUT: |
| 115 |
|
| RETVAL |
| 116 |
|
| |
| 117 |
|
| void |
| 118 |
|
| XPVTV::CLEAR() |
| 119 |
|
| CODE: |
| 120 |
1490 |
| tietv_clear(THIS); |
| 121 |
|
| |
| 122 |
|
| int |
| 123 |
|
| XPVTV::EXISTS(key) |
| 124 |
|
| char *key |
| 125 |
|
| PREINIT: |
| 126 |
0 |
▶ | XPVTC *tc = tv_global; |
Branch: 1 branch
| Branch | True | False | Total |
| XPVTC *tc = tv_global; |
0 |
0 |
0 |
|
| 127 |
|
| CODE: |
| 128 |
0 |
| tc_refocus(tc, THIS); |
| 129 |
0 |
| RETVAL = tietc_seek(tc,key, Unique); |
| 130 |
0 |
| tc_refocus(tc, 0); |
| 131 |
|
| OUTPUT: |
| 132 |
|
| RETVAL |
| 133 |
|
| |
| 134 |
|
| char * |
| 135 |
|
| XPVTV::FIRSTKEY() |
| 136 |
|
| PREINIT: |
| 137 |
0 |
▶ | XPVTC *tc = tv_global; |
Branch: 1 branch
| Branch | True | False | Total |
| XPVTC *tc = tv_global; |
0 |
0 |
0 |
|
| 138 |
|
| SV **out; |
| 139 |
|
| CODE: |
| 140 |
0 |
| tc_refocus(tc, THIS); |
| 141 |
0 |
| tc_moveto(tc,-1); |
| 142 |
0 |
| tc_step(tc,1); |
| 143 |
0 |
| RETVAL = tietc_fetch(tc, &out); |
| 144 |
0 |
| tc_refocus(tc, 0); |
| 145 |
|
| OUTPUT: |
| 146 |
|
| RETVAL |
| 147 |
|
| |
| 148 |
|
| char * |
| 149 |
|
| XPVTV::NEXTKEY(lastkey) |
| 150 |
|
| char *lastkey |
| 151 |
|
| PREINIT: |
| 152 |
0 |
▶ | XPVTC *tc = tv_global; |
Branch: 1 branch
| Branch | True | False | Total |
| XPVTC *tc = tv_global; |
0 |
0 |
0 |
|
| 153 |
|
| SV **out; |
| 154 |
|
| CODE: |
| 155 |
0 |
| tc_refocus(tc, THIS); |
| 156 |
|
| /* Can perl help manage cursors please?! XXX */ |
| 157 |
0 |
| tietc_seek(tc,lastkey, Unique); |
| 158 |
0 |
| tc_step(tc,1); |
| 159 |
0 |
| RETVAL = tietc_fetch(tc, &out); |
| 160 |
0 |
| tc_refocus(tc, 0); |
| 161 |
|
| OUTPUT: |
| 162 |
|
| RETVAL |
| 163 |
|
| |
| 164 |
|
| void |
| 165 |
|
| XPVTV::DESTORY() |
| 166 |
|
| CODE: |
| 167 |
0 |
| tiefree_tv(THIS); |
| 168 |
|
| |
| 169 |
|
| void |
| 170 |
|
| XPVTV::unshift(val) |
| 171 |
|
| SV *val |
| 172 |
|
| PREINIT: |
| 173 |
|
| STRLEN n_a; |
| 174 |
0 |
| XPVTC *tc = tv_global; |
| 175 |
|
| CODE: |
| 176 |
0 |
| tc_refocus(tc, THIS); |
| 177 |
0 |
| tc_moveto(tc,-1); |
| 178 |
0 |
| tietc_insert(MYOBJ_ tc, SvPV(val,n_a), &val); |
| 179 |
0 |
| tc_refocus(tc, 0); |
| 180 |
|
| |
| 181 |
|
| void |
| 182 |
|
| XPVTV::push(val) |
| 183 |
|
| SV *val |
| 184 |
|
| PREINIT: |
| 185 |
|
| STRLEN n_a; |
| 186 |
0 |
| XPVTC *tc = tv_global; |
| 187 |
|
| CODE: |
| 188 |
0 |
| tc_refocus(tc, THIS); |
| 189 |
0 |
| tc_moveto(tc, 1<<30); |
| 190 |
0 |
| tietc_insert(MYOBJ_ tc, SvPV(val,n_a), &val); |
| 191 |
0 |
| tc_refocus(tc, 0); |
| 192 |
|
| |
| 193 |
|
| void |
| 194 |
|
| XPVTV::stats() |
| 195 |
|
| PPCODE: |
| 196 |
104 |
▶ | XPUSHs(sv_2mortal(newSViv(TvFILL(THIS)))); |
Branch: 2 branches
| Branch | True | False | Total |
| XPUSHs(sv_2mortal(newSViv(TvFILL(THIS)))); |
0 |
104 |
104 |
| XPUSHs(sv_2mortal(newSViv(TvFILL(THIS)))); |
98 |
6 |
104 |
|
| 197 |
104 |
▶ | XPUSHs(sv_2mortal(newSViv(tieTnWIDTH * TvMAX(THIS)))); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_2mortal(newSViv(tieTnWIDTH * TvMAX(THIS)))); |
0 |
104 |
104 |
|
| 198 |
|
| |
| 199 |
|
| void |
| 200 |
|
| XPVTV::treestats() |
| 201 |
|
| PREINIT: |
| 202 |
|
| double depth, center; |
| 203 |
|
| PPCODE: |
| 204 |
0 |
| tc_refocus(tv_global, THIS); |
| 205 |
0 |
| tietv_treestats(tv_global, &depth, ¢er); |
| 206 |
0 |
▶ | XPUSHs(sv_2mortal(newSVpv("fill",0))); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_2mortal(newSVpv("fill",0))); |
0 |
0 |
0 |
|
| 207 |
0 |
▶ | XPUSHs(sv_2mortal(newSViv(TvFILL(THIS)))); |
Branch: 2 branches
| Branch | True | False | Total |
| XPUSHs(sv_2mortal(newSViv(TvFILL(THIS)))); |
0 |
0 |
0 |
| XPUSHs(sv_2mortal(newSViv(TvFILL(THIS)))); |
0 |
0 |
0 |
|
| 208 |
0 |
▶ | XPUSHs(sv_2mortal(newSVpv("max",0))); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_2mortal(newSVpv("max",0))); |
0 |
0 |
0 |
|
| 209 |
0 |
▶ | XPUSHs(sv_2mortal(newSViv(tieTnWIDTH * TvMAX(THIS)))); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_2mortal(newSViv(tieTnWIDTH * TvMAX(THIS)))); |
0 |
0 |
0 |
|
| 210 |
0 |
▶ | XPUSHs(sv_2mortal(newSVpv("depth",0))); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_2mortal(newSVpv("depth",0))); |
0 |
0 |
0 |
|
| 211 |
0 |
▶ | XPUSHs(sv_2mortal(newSVnv(depth))); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_2mortal(newSVnv(depth))); |
0 |
0 |
0 |
|
| 212 |
0 |
▶ | XPUSHs(sv_2mortal(newSVpv("center",0))); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_2mortal(newSVpv("center",0))); |
0 |
0 |
0 |
|
| 213 |
0 |
▶ | XPUSHs(sv_2mortal(newSVnv(center))); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_2mortal(newSVnv(center))); |
0 |
0 |
0 |
|
| 214 |
|
| |
| 215 |
|
| void |
| 216 |
|
| opstats(...) |
| 217 |
|
| PREINIT: |
| 218 |
0 |
| XPVTC *tc = tv_global; |
| 219 |
|
| I32 val; |
| 220 |
|
| int xx; |
| 221 |
|
| char *name; |
| 222 |
|
| PPCODE: |
| 223 |
0 |
| xx = 0; |
| 224 |
0 |
| tc_refocus(tc, 0); |
| 225 |
0 |
▶ | while (name = tc_getstat(tc, xx++, &val)) { |
Branch: 1 branch
| Branch | True | False | Total |
| while (name = tc_getstat(tc, xx++, &val)) { |
0 |
0 |
0 |
|
| 226 |
0 |
▶ | XPUSHs(sv_2mortal(newSVpv(name,0))); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_2mortal(newSVpv(name,0))); |
0 |
0 |
0 |
|
| 227 |
0 |
▶ | XPUSHs(sv_2mortal(newSViv(val))); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_2mortal(newSViv(val))); |
0 |
0 |
0 |
|
| 228 |
|
| } |
| 229 |
|
| |
| 230 |
|
| void |
| 231 |
|
| sizeof(...) |
| 232 |
|
| PPCODE: |
| 233 |
0 |
▶ | XPUSHs(sv_2mortal(newSViv(tieTnWIDTH))); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_2mortal(newSViv(tieTnWIDTH))); |
0 |
0 |
0 |
|
| 234 |
0 |
▶ | XPUSHs(sv_2mortal(newSViv(sizeof(tieTN)))); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_2mortal(newSViv(sizeof(tieTN)))); |
0 |
0 |
0 |
|
| 235 |
|
| |
| 236 |
|
| void |
| 237 |
|
| XPVTV::dump() |
| 238 |
|
| CODE: |
| 239 |
0 |
| tietv_dump(THIS); |
| 240 |
|
| |
| 241 |
|
| void |
| 242 |
|
| XPVTV::new_cursor() |
| 243 |
|
| PREINIT: |
| 244 |
28 |
| char *CLASS = "Tree::Fat::Remote"; |
| 245 |
|
| XPVTC *tc; |
| 246 |
|
| PPCODE: |
| 247 |
|
| /* refcnts XXX */ |
| 248 |
28 |
| tc = init_tc((XPVTC*) safemalloc(sizeof(XPVTC))); |
| 249 |
28 |
| tc_refocus(tc, THIS); |
| 250 |
28 |
▶ | XPUSHs(sv_setref_pv(sv_newmortal(), CLASS, tc)); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_setref_pv(sv_newmortal(), CLASS, tc)); |
0 |
28 |
28 |
|
| 251 |
|
| |
| 252 |
|
| |
| 253 |
|
| MODULE = Tree::Fat PACKAGE = Tree::Fat::Remote |
| 254 |
|
| |
| 255 |
|
| void |
| 256 |
|
| XPVTC::DESTROY() |
| 257 |
|
| CODE: |
| 258 |
|
| /*warn("TC(%p)->DESTROY\n", THIS);/**/ |
| 259 |
28 |
▶ | if (THIS != tv_global) free_tc(THIS); |
Branch: 1 branch
| Branch | True | False | Total |
| if (THIS != tv_global) free_tc(THIS); |
28 |
0 |
28 |
|
| 260 |
|
| |
| 261 |
|
| XPVTC* |
| 262 |
|
| global(...) |
| 263 |
|
| PREINIT: |
| 264 |
0 |
| char *CLASS = "Tree::Fat::Test::Remote"; |
| 265 |
|
| PPCODE: |
| 266 |
|
| assert(tv_global); |
| 267 |
0 |
▶ | XPUSHs(sv_setref_pv(sv_newmortal(), CLASS, tv_global)); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_setref_pv(sv_newmortal(), CLASS, tv_global)); |
0 |
0 |
0 |
|
| 268 |
|
| |
| 269 |
|
| void |
| 270 |
|
| XPVTC::stats() |
| 271 |
|
| PREINIT: |
| 272 |
|
| I32 val; |
| 273 |
|
| int xx; |
| 274 |
|
| char *name; |
| 275 |
|
| PPCODE: |
| 276 |
0 |
| xx = 0; |
| 277 |
0 |
▶ | while (name = tc_getstat(THIS, xx++, &val)) { |
Branch: 1 branch
| Branch | True | False | Total |
| while (name = tc_getstat(THIS, xx++, &val)) { |
0 |
0 |
0 |
|
| 278 |
0 |
▶ | XPUSHs(sv_2mortal(newSVpv(name,0))); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_2mortal(newSVpv(name,0))); |
0 |
0 |
0 |
|
| 279 |
0 |
▶ | XPUSHs(sv_2mortal(newSViv(val))); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_2mortal(newSViv(val))); |
0 |
0 |
0 |
|
| 280 |
|
| } |
| 281 |
|
| |
| 282 |
|
| XPVTV * |
| 283 |
|
| XPVTC::focus() |
| 284 |
|
| PREINIT: |
| 285 |
0 |
| char *CLASS = "Tree::Fat"; |
| 286 |
|
| CODE: |
| 287 |
0 |
| RETVAL = TcTV(THIS); |
| 288 |
|
| OUTPUT: |
| 289 |
|
| RETVAL |
| 290 |
|
| |
| 291 |
|
| void |
| 292 |
|
| XPVTC::delete() |
| 293 |
|
| CODE: |
| 294 |
42 |
| tietc_delete(MYOBJ_ THIS); |
| 295 |
|
| |
| 296 |
|
| void |
| 297 |
|
| XPVTC::insert(key, data) |
| 298 |
|
| char *key |
| 299 |
|
| SV *data |
| 300 |
|
| CODE: |
| 301 |
36 |
| tietc_insert(MYOBJ_ THIS, key, &data); |
| 302 |
|
| |
| 303 |
|
| void |
| 304 |
|
| XPVTC::moveto(...) |
| 305 |
|
| PROTOTYPE: $;$ |
| 306 |
|
| PREINIT: |
| 307 |
|
| STRLEN n_a; |
| 308 |
|
| SV *where; |
| 309 |
1708 |
| I32 xto=-2; |
| 310 |
|
| CODE: |
| 311 |
1708 |
▶ | if (items == 1) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (items == 1) { |
0 |
1708 |
1708 |
|
| 312 |
0 |
| xto=-1; |
| 313 |
|
| } else { |
| 314 |
1708 |
| where = ST(1); |
| 315 |
1708 |
▶ | if (SvNIOK(where)) { xto = SvIV(where); } |
Branch: 1 branch
| Branch | True | False | Total |
| if (SvNIOK(where)) { xto = SvIV(where); } |
172 |
1536 |
1708 |
|
| 316 |
1536 |
▶ | else if (SvPOK(where)) { |
Branch: 1 branch
| Branch | True | False | Total |
| else if (SvPOK(where)) { |
1536 |
0 |
1536 |
|
| 317 |
1536 |
| char *wh = SvPV(where, n_a); |
| 318 |
1536 |
▶ | if (strEQ(wh, "start")) xto=-1; |
Branch: 1 branch
| Branch | True | False | Total |
| if (strEQ(wh, "start")) xto=-1; |
1486 |
50 |
1536 |
|
| 319 |
50 |
▶ | else if (strEQ(wh, "end")) { |
Branch: 1 branch
| Branch | True | False | Total |
| else if (strEQ(wh, "end")) { |
50 |
0 |
50 |
|
| 320 |
50 |
| XPVTV *tv = TcTV(THIS); |
| 321 |
50 |
▶ | xto=TvFILL(tv); |
Branch: 1 branch
| Branch | True | False | Total |
| xto=TvFILL(tv); |
50 |
0 |
50 |
|
| 322 |
|
| } |
| 323 |
|
| } else { |
| 324 |
0 |
| croak("TC(%p)->moveto(): unknown location", THIS); |
| 325 |
|
| } |
| 326 |
|
| } |
| 327 |
1708 |
| tc_moveto(THIS, xto); |
| 328 |
|
| |
| 329 |
|
| SV * |
| 330 |
|
| XPVTC::pos() |
| 331 |
|
| PREINIT: |
| 332 |
|
| I32 where; |
| 333 |
|
| PPCODE: |
| 334 |
3013 |
▶ | XPUSHs(sv_2mortal(newSViv(tc_pos(THIS)))); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_2mortal(newSViv(tc_pos(THIS)))); |
0 |
3013 |
3013 |
|
| 335 |
|
| |
| 336 |
|
| int |
| 337 |
|
| XPVTC::seek(key) |
| 338 |
|
| char *key |
| 339 |
|
| CODE: |
| 340 |
53986 |
| RETVAL = tietc_seek(THIS, key, Unique); |
| 341 |
|
| OUTPUT: |
| 342 |
|
| RETVAL |
| 343 |
|
| |
| 344 |
|
| void |
| 345 |
|
| XPVTC::step(delta) |
| 346 |
|
| int delta |
| 347 |
|
| CODE: |
| 348 |
4214 |
| tc_step(THIS, delta); |
| 349 |
|
| |
| 350 |
|
| void |
| 351 |
|
| XPVTC::each(delta) |
| 352 |
|
| int delta; |
| 353 |
|
| PREINIT: |
| 354 |
|
| char *key; |
| 355 |
|
| SV **out; |
| 356 |
|
| PPCODE: |
| 357 |
21894 |
| tc_step(THIS, delta); |
| 358 |
21894 |
| key = tietc_fetch(THIS, &out); |
| 359 |
21894 |
▶ | if (key) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (key) { |
20294 |
1600 |
21894 |
|
| 360 |
20294 |
▶ | XPUSHs(sv_2mortal(newSVpv(key,0))); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_2mortal(newSVpv(key,0))); |
0 |
20294 |
20294 |
|
| 361 |
20294 |
▶ | XPUSHs(sv_2mortal(newSVsv(*out))); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_2mortal(newSVsv(*out))); |
0 |
20294 |
20294 |
|
| 362 |
|
| } |
| 363 |
|
| |
| 364 |
|
| void |
| 365 |
|
| XPVTC::fetch() |
| 366 |
|
| PREINIT: |
| 367 |
|
| char *key; |
| 368 |
|
| SV **out; |
| 369 |
|
| PPCODE: |
| 370 |
5109 |
| key = tietc_fetch(THIS, &out); |
| 371 |
5107 |
▶ | if (key) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (key) { |
5057 |
50 |
5107 |
|
| 372 |
5057 |
▶ | XPUSHs(sv_2mortal(newSVpv(key,0))); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_2mortal(newSVpv(key,0))); |
0 |
5057 |
5057 |
|
| 373 |
5057 |
▶ | XPUSHs(sv_2mortal(newSVsv(*out))); |
Branch: 1 branch
| Branch | True | False | Total |
| XPUSHs(sv_2mortal(newSVsv(*out))); |
0 |
5057 |
5057 |
|
| 374 |
|
| } |
| 375 |
|
| |
| 376 |
|
| void |
| 377 |
|
| XPVTC::store(data) |
| 378 |
|
| SV *data |
| 379 |
|
| CODE: |
| 380 |
4 |
| tietc_store(MYOBJ_ THIS, &data); |
| 381 |
|
| |
| 382 |
|
| void |
| 383 |
|
| XPVTC::dump() |
| 384 |
|
| CODE: |
| 385 |
0 |
| tietc_dump(THIS); |