Make Perl_unshare_hek visible to core extensions without being public
Steve Hay [Wed, 3 May 2006 08:25:27 +0000 (08:25 +0000)]
See the comments in:
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-04/msg00480.html
(which were put into practice in changes #27800 and #27848)
p4raw-link: @27800 on //depot/perl: 1242dfaee525d4d0ab20ac8ae62b3f0de03fa88e

p4raw-id: //depot/perl@28073

embed.fnc
embed.h

index cf10e1b..02feb65 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -886,7 +886,7 @@ Apd |I32    |unpack_str     |NN const char *pat|NN const char *patend|NN const char *s
 Apd    |I32    |unpackstring   |NN const char *pat|NN const char *patend|NN const char *s \
                                |NN const char *strend|U32 flags
 Ap     |void   |unsharepvn     |NULLOK const char* sv|I32 len|U32 hash
-Ap     |void   |unshare_hek    |NULLOK HEK* hek
+XEp    |void   |unshare_hek    |NULLOK HEK* hek
 #ifdef PERL_MAD
 p      |OP *   |utilize        |int aver|I32 floor|NULLOK OP* version \
                                |NN OP* idop|NULLOK OP* arg
diff --git a/embed.h b/embed.h
index bb8108f..ed3f5b3 100644 (file)
--- a/embed.h
+++ b/embed.h
 #define unpack_str             Perl_unpack_str
 #define unpackstring           Perl_unpackstring
 #define unsharepvn             Perl_unsharepvn
+#if defined(PERL_CORE) || defined(PERL_EXT)
 #define unshare_hek            Perl_unshare_hek
+#endif
 #ifdef PERL_MAD
 #ifdef PERL_CORE
 #define utilize                        Perl_utilize
 #define unpack_str(a,b,c,d,e,f,g,h)    Perl_unpack_str(aTHX_ a,b,c,d,e,f,g,h)
 #define unpackstring(a,b,c,d,e)        Perl_unpackstring(aTHX_ a,b,c,d,e)
 #define unsharepvn(a,b,c)      Perl_unsharepvn(aTHX_ a,b,c)
+#if defined(PERL_CORE) || defined(PERL_EXT)
 #define unshare_hek(a)         Perl_unshare_hek(aTHX_ a)
+#endif
 #ifdef PERL_MAD
 #ifdef PERL_CORE
 #define utilize(a,b,c,d,e)     Perl_utilize(aTHX_ a,b,c,d,e)