Replace Perl_my() with a small shell script. er. macro.
authorNicholas Clark <nick@ccl4.org>
Wed, 26 Nov 2008 11:57:59 +0000 (11:57 +0000)
committerNicholas Clark <nick@ccl4.org>
Wed, 26 Nov 2008 11:57:59 +0000 (11:57 +0000)
p4raw-id: //depot/perl@34917

embed.fnc
embed.h
op.c
op.h
proto.h

index 0254a57..d9eb78e 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -530,7 +530,6 @@ Ap  |void   |mini_mktime    |NN struct tm *ptm
 EXp    |OP*    |mod            |NULLOK OP* o|I32 type
 p      |int    |mode_from_discipline|NULLOK const char* s|STRLEN len
 Ap     |const char*    |moreswitches   |NN const char* s
-p      |OP*    |my             |NN OP* o
 Ap     |NV     |my_atof        |NN const char *s
 #if (!defined(HAS_MEMCPY) && !defined(HAS_BCOPY)) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY) && !defined(HAS_SAFE_BCOPY))
 Anp    |char*  |my_bcopy       |NN const char* from|NN char* to|I32 len
diff --git a/embed.h b/embed.h
index 2fb6296..9f453d1 100644 (file)
--- a/embed.h
+++ b/embed.h
 #define mode_from_discipline   Perl_mode_from_discipline
 #endif
 #define moreswitches           Perl_moreswitches
-#ifdef PERL_CORE
-#define my                     Perl_my
-#endif
 #define my_atof                        Perl_my_atof
 #if (!defined(HAS_MEMCPY) && !defined(HAS_BCOPY)) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY) && !defined(HAS_SAFE_BCOPY))
 #define my_bcopy               Perl_my_bcopy
 #define mode_from_discipline(a,b)      Perl_mode_from_discipline(aTHX_ a,b)
 #endif
 #define moreswitches(a)                Perl_moreswitches(aTHX_ a)
-#ifdef PERL_CORE
-#define my(a)                  Perl_my(aTHX_ a)
-#endif
 #define my_atof(a)             Perl_my_atof(aTHX_ a)
 #if (!defined(HAS_MEMCPY) && !defined(HAS_BCOPY)) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY) && !defined(HAS_SAFE_BCOPY))
 #define my_bcopy               Perl_my_bcopy
diff --git a/op.c b/op.c
index 102c20e..28440e0 100644 (file)
--- a/op.c
+++ b/op.c
@@ -2152,14 +2152,6 @@ Perl_my_attrs(pTHX_ OP *o, OP *attrs)
 }
 
 OP *
-Perl_my(pTHX_ OP *o)
-{
-    PERL_ARGS_ASSERT_MY;
-
-    return my_attrs(o, NULL);
-}
-
-OP *
 Perl_sawparens(pTHX_ OP *o)
 {
     PERL_UNUSED_CONTEXT;
diff --git a/op.h b/op.h
index a90be0a..dad6016 100644 (file)
--- a/op.h
+++ b/op.h
@@ -614,6 +614,10 @@ struct loop {
    cv_ckproto_len((cv), (gv), (p), (p) ? strlen(p) : 0)
 #endif
 
+#ifdef PERL_CORE
+#  define my(o)        my_attrs((o), NULL)
+#endif
+
 #ifdef USE_REENTRANT_API
 #include "reentr.h"
 #endif
diff --git a/proto.h b/proto.h
index c8e7f6f..4fb9ec4 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -1899,11 +1899,6 @@ PERL_CALLCONV const char*        Perl_moreswitches(pTHX_ const char* s)
 #define PERL_ARGS_ASSERT_MORESWITCHES  \
        assert(s)
 
-PERL_CALLCONV OP*      Perl_my(pTHX_ OP* o)
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_MY    \
-       assert(o)
-
 PERL_CALLCONV NV       Perl_my_atof(pTHX_ const char *s)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_MY_ATOF       \