… | |
… | |
228 | |
228 | |
229 | if (!SvOK (sv)) |
229 | if (!SvOK (sv)) |
230 | XPUSHs (sv_2mortal (newSVpvn ("\02", 1))); /* 02 == MAGIC_undef */ |
230 | XPUSHs (sv_2mortal (newSVpvn ("\02", 1))); /* 02 == MAGIC_undef */ |
231 | else if (SvTYPE(sv) != SVt_IV |
231 | else if (SvTYPE(sv) != SVt_IV |
232 | && SvTYPE(sv) != SVt_NV |
232 | && SvTYPE(sv) != SVt_NV |
|
|
233 | && SvTYPE(sv) != SVt_PV |
233 | && SvTYPE(sv) != SVt_PV) /* mstore */ |
234 | && SvTYPE(sv) != SVt_PVMG) /* mstore */ |
234 | { |
235 | { |
235 | if (!storable_mstore) |
236 | if (!storable_mstore) |
236 | need_storable (); |
237 | need_storable (); |
237 | |
238 | |
238 | PUSHMARK (SP); |
239 | PUSHMARK (SP); |
… | |
… | |
265 | sthaw(sv) |
266 | sthaw(sv) |
266 | SV * sv |
267 | SV * sv |
267 | PROTOTYPE: $ |
268 | PROTOTYPE: $ |
268 | PPCODE: |
269 | PPCODE: |
269 | |
270 | |
|
|
271 | SvGETMAGIC (sv); |
270 | if (IN_RANGE (SvPV_nolen (sv)[0], MAGIC_LO, MAGIC_HI)) |
272 | if (SvPOK (sv) && IN_RANGE (SvPV_nolen (sv)[0], MAGIC_LO, MAGIC_HI)) |
271 | { |
273 | { |
272 | switch (SvPVX (sv)[0]) |
274 | switch (SvPVX (sv)[0]) |
273 | { |
275 | { |
274 | case MAGIC_undef: |
276 | case MAGIC_undef: |
275 | XPUSHs (sv_2mortal (NEWSV (0, 0))); |
277 | XPUSHs (sv_2mortal (NEWSV (0, 0))); |
… | |
… | |
296 | if (1 != call_sv ((SV *)storable_mretrieve, G_SCALAR)) |
298 | if (1 != call_sv ((SV *)storable_mretrieve, G_SCALAR)) |
297 | croak ("Storable::mstore didn't return a single scalar"); |
299 | croak ("Storable::mstore didn't return a single scalar"); |
298 | |
300 | |
299 | SPAGAIN; |
301 | SPAGAIN; |
300 | |
302 | |
301 | XPUSHs (POPs); /* this is a nop, hope the compiler also knows this */ |
303 | /*XPUSHs (POPs); this is a nop, hopefully */ |
302 | |
304 | |
303 | break; |
305 | break; |
304 | |
306 | |
305 | default: |
307 | default: |
306 | croak ("Compress::LZF::sthaw(): invalid data, maybe you need a newer version of Compress::LZF?"); |
308 | croak ("Compress::LZF::sthaw(): invalid data, maybe you need a newer version of Compress::LZF?"); |