diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-04-19 08:42:18 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-04-19 08:42:18 +0000 |
commit | cbf82dd00c19573e7e274a1d8dda9656bc6e259a (patch) | |
tree | 85a421e839c6a91506d7a9f972bf553b2cf43845 /embed.h | |
parent | 39cd7a593a348b713bd3e45241789bcc2a458c1a (diff) | |
download | perl-cbf82dd00c19573e7e274a1d8dda9656bc6e259a.tar.gz |
Calling cv_undef() on the CV created by newCONSTSUB() would leak like
a Jumblie's preferred maritime craft. To free CvFILE for this case,
take advantage of the 0 length prototype that will also be there,
and hang it from the prototype. To do this properly means changing
code to actually pay attention to SvCUR() on prototypes. It turns out
that we always know the length of the prototype string, so this may
be faster. Certainly, it's a memory saving (even ignoring the leak).
p4raw-id: //depot/perl@27896
Diffstat (limited to 'embed.h')
-rw-r--r-- | embed.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -117,6 +117,7 @@ #endif #ifdef PERL_CORE #define cv_ckproto Perl_cv_ckproto +#define cv_ckproto_len Perl_cv_ckproto_len #define cv_clone Perl_cv_clone #endif #define gv_const_sv Perl_gv_const_sv @@ -2281,6 +2282,7 @@ #endif #ifdef PERL_CORE #define cv_ckproto(a,b,c) Perl_cv_ckproto(aTHX_ a,b,c) +#define cv_ckproto_len(a,b,c,d) Perl_cv_ckproto_len(aTHX_ a,b,c,d) #define cv_clone(a) Perl_cv_clone(aTHX_ a) #endif #define gv_const_sv(a) Perl_gv_const_sv(aTHX_ a) |