Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 24 lines (18 sloc) 0.605 kb
36b5369 M. Nunberg initial commit
authored
1 TYPEMAP
2
3 PLJSONSL * T_PLJSONSL
4 PLTUBA* T_PLTUBA
5
6 INPUT
7 T_PLJSONSL
8 if (! (SvROK($arg) && SvOBJECT(SvRV($arg)) && SvIOK(SvRV($arg)))) {
9 die(\"Not a valid JSON::SL object\");
10 }
11
12 $var = NUM2PTR(PLJSONSL *, SvIV(SvRV($arg)));
13
14 T_PLTUBA
1a2501d M. Nunberg Tuba tuba tuba. also fixed compiler warnings and some more docs
authored
15 if (! (SvROK($arg) && SvOBJECT(SvRV($arg)) && SvTYPE(SvRV($arg)) >= SVt_PVHV)) {
36b5369 M. Nunberg initial commit
authored
16 die(\"Not a valid JSON::SL::Tuba object\");
17 }
1a2501d M. Nunberg Tuba tuba tuba. also fixed compiler warnings and some more docs
authored
18 $var = (PLTUBA*)hv_fetchs((HV*)SvRV($arg), PLTUBA_HKEY_NAME, 0);
19 if ($var == NULL || (SvIOK(*(SV**)$var) == 0 && SvREFCNT($arg))) {
20 die(\"Did you mangle my hash?!\");
21 }
22 $var = NUM2PTR(PLTUBA *, SvIV(*(SV**)$var));
36b5369 M. Nunberg initial commit
authored
23
Something went wrong with that request. Please try again.