Skip to content

Commit 7cd47db

Browse files
committed
Storable: use SvVSTRING() from ppport.h
1 parent 1db6b57 commit 7cd47db

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

dist/Storable/Storable.xs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#define NEED_newCONSTSUB
2323
#define NEED_newSVpvn_flags
2424
#define NEED_newRV_noinc
25+
#define NEED_sv_vstring_get
2526
#include "ppport.h" /* handle old perls */
2627

2728
#ifdef DEBUGGING
@@ -296,23 +297,6 @@ typedef STRLEN ntag_t;
296297
#define VSTRING_CROAK() CROAK(("Cannot retrieve vstring in this perl"))
297298
#endif
298299

299-
#ifndef sv_vstring_get
300-
#define sv_vstring_get(sv,lenp) S_sv_vstring_get(aTHX_ sv,lenp)
301-
static const char *S_sv_vstring_get(pTHX_ SV *sv, STRLEN *lenp)
302-
{
303-
MAGIC *mg;
304-
if(!SvMAGICAL(sv) || !(mg = mg_find(sv, PERL_MAGIC_vstring)))
305-
return NULL;
306-
307-
*lenp = mg->mg_len;
308-
return mg->mg_ptr;
309-
}
310-
#endif
311-
312-
#ifndef SvVSTRING
313-
#define SvVSTRING(sv,len) (sv_vstring_get(sv, &(len)))
314-
#endif
315-
316300
#ifdef HvPLACEHOLDERS
317301
#define HAS_RESTRICTED_HASHES
318302
#else

dist/Storable/lib/Storable.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ our @EXPORT_OK = qw(
3030
our ($canonical, $forgive_me);
3131

3232
BEGIN {
33-
our $VERSION = '3.36';
33+
our $VERSION = '3.37';
3434
}
3535

3636
our $recursion_limit;

0 commit comments

Comments
 (0)