ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Compress-LZF/LZF.xs
(Generate patch)

Comparing Compress-LZF/LZF.xs (file contents):
Revision 1.24 by root, Mon Apr 16 20:05:33 2007 UTC vs.
Revision 1.26 by root, Mon Sep 22 02:15:43 2008 UTC

283 && SvTYPE(sv) != SVt_PVIV 283 && SvTYPE(sv) != SVt_PVIV
284 && SvTYPE(sv) != SVt_PVNV 284 && SvTYPE(sv) != SVt_PVNV
285 && SvTYPE(sv) != SVt_PVMG)) /* mstore */ 285 && SvTYPE(sv) != SVt_PVMG)) /* mstore */
286 { 286 {
287 int deref = !SvROK (sv); 287 int deref = !SvROK (sv);
288 char *pv;
288 289
289 if (!storable_mstore) 290 if (!storable_mstore)
291 {
292 PUTBACK;
290 need_storable (); 293 need_storable ();
294 SPAGAIN;
295 }
291 296
292 if (deref) 297 if (deref)
293 sv = newRV_noinc (sv); 298 sv = newRV_noinc (sv);
294 299
295 PUSHMARK (SP); 300 PUSHMARK (SP);
300 croak ("Storable::mstore didn't return a single scalar"); 305 croak ("Storable::mstore didn't return a single scalar");
301 306
302 SPAGAIN; 307 SPAGAIN;
303 308
304 sv = POPs; 309 sv = POPs;
310 pv = SvPV_nolen (sv);
305 311
306 if (SvPVX (sv)[0] == MAGIC_R) 312 if (*pv == MAGIC_R)
307 { 313 {
308 if (deref) 314 if (deref)
309 SvPVX (sv)[0] = MAGIC_R_deref; 315 *pv = MAGIC_R_deref;
310 } 316 }
311 else 317 else
312 { 318 {
313 char pfx[2]; 319 char pfx[2];
314 320
363 croak ("Compress::LZF::sthaw(): invalid data, maybe you need a newer version of Compress::LZF?"); 369 croak ("Compress::LZF::sthaw(): invalid data, maybe you need a newer version of Compress::LZF?");
364 370
365 sv_chop (sv, SvPVX (sv) + 2); 371 sv_chop (sv, SvPVX (sv) + 2);
366 372
367 if (!storable_mstore) 373 if (!storable_mstore)
374 {
375 PUTBACK;
368 need_storable (); 376 need_storable ();
377 SPAGAIN;
378 }
369 379
370 PUSHMARK (SP); 380 PUSHMARK (SP);
371 XPUSHs (sv); 381 XPUSHs (sv);
372 PUTBACK; 382 PUTBACK;
373 383
407 goto redo; 417 goto redo;
408 418
409 case MAGIC_R: 419 case MAGIC_R:
410 handle_MAGIC_R: 420 handle_MAGIC_R:
411 if (!storable_mstore) 421 if (!storable_mstore)
422 {
423 PUTBACK;
412 need_storable (); 424 need_storable ();
425 SPAGAIN;
426 }
413 427
414 PUSHMARK (SP); 428 PUSHMARK (SP);
415 XPUSHs (sv); 429 XPUSHs (sv);
416 PUTBACK; 430 PUTBACK;
417 431

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines