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.1 by root, Thu Sep 27 18:36:34 2001 UTC vs.
Revision 1.3 by root, Thu Sep 27 19:51:26 2001 UTC

8#include "patchlevel.h" 8#include "patchlevel.h"
9#if (PATCHLEVEL == 4) || ((PATCHLEVEL == 5) && (SUBVERSION < 55)) 9#if (PATCHLEVEL == 4) || ((PATCHLEVEL == 5) && (SUBVERSION < 55))
10static STRLEN nolen_na; 10static STRLEN nolen_na;
11# define SvPV_nolen(sv) SvPV ((sv), nolen_na) 11# define SvPV_nolen(sv) SvPV ((sv), nolen_na)
12#endif 12#endif
13#if PATCHLEVEL < 6
14# define call_sv perl_call_sv
15#endif
13 16
14#include "lzf_c.c" 17#include "lzf_c.c"
15#include "lzf_d.c" 18#include "lzf_d.c"
16 19
17/* we re-use the storable header for our purposes */ 20/* we re-use the storable header for our purposes */
185} 188}
186 189
187static void 190static void
188need_storable(void) 191need_storable(void)
189{ 192{
193#if PATCHLEVEL < 6
194 perl_eval_pv ("require Storable;", 1);
195#else
190 load_module (PERL_LOADMOD_NOIMPORT, newSVpv ("Storable", 0), Nullsv); 196 load_module (PERL_LOADMOD_NOIMPORT, newSVpv ("Storable", 0), Nullsv);
197#endif
191 198
192 storable_mstore = GvCV (gv_fetchpv ("Storable::mstore" , TRUE, SVt_PVCV)); 199 storable_mstore = GvCV (gv_fetchpv ("Storable::mstore" , TRUE, SVt_PVCV));
193 storable_mretrieve = GvCV (gv_fetchpv ("Storable::mretrieve", TRUE, SVt_PVCV)); 200 storable_mretrieve = GvCV (gv_fetchpv ("Storable::mretrieve", TRUE, SVt_PVCV));
194} 201}
195 202
216 sfreeze_cr = 1 223 sfreeze_cr = 1
217 sfreeze_c = 2 224 sfreeze_c = 2
218 PROTOTYPE: $ 225 PROTOTYPE: $
219 PPCODE: 226 PPCODE:
220 227
221 if (SvROK (sv)) /* mstore */ 228 if (SvTYPE(sv) != SVt_IV
229 && SvTYPE(sv) != SVt_NV
230 && SvTYPE(sv) != SVt_PV) /* mstore */
222 { 231 {
223 if (!storable_mstore) 232 if (!storable_mstore)
224 need_storable (); 233 need_storable ();
225 234
226 PUSHMARK (SP); 235 PUSHMARK (SP);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines