This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Builds and passes all tests with gcc on Win32 - phew!
authorNick Ing-Simmons <nik@tiuk.ti.com>
Mon, 1 Dec 1997 04:01:57 +0000 (04:01 +0000)
committerNick Ing-Simmons <nik@tiuk.ti.com>
Mon, 1 Dec 1997 04:01:57 +0000 (04:01 +0000)
p4raw-id: //depot/ansiperl@342

embed.h
ext/Opcode/Opcode.xs
global.sym
perl.h
proto.h
util.c
win32/makedef.pl

diff --git a/embed.h b/embed.h
index 38913b3..bd483e3 100644 (file)
--- a/embed.h
+++ b/embed.h
 #define freq                   Perl_freq
 #define ge_amg                 Perl_ge_amg
 #define gen_constant_list      Perl_gen_constant_list
+#define get_op_descs           Perl_get_op_descs
+#define get_op_names           Perl_get_op_names
 #define gp_free                        Perl_gp_free
 #define gp_ref                 Perl_gp_ref
 #define gt_amg                 Perl_gt_amg
index bed7099..31e734a 100644 (file)
@@ -28,15 +28,16 @@ op_names_init(void)
 {
     int i;
     STRLEN len;
-    char *opname;
+    char **op_names;
     char *bitmap;
 
     op_named_bits = newHV();
+    op_names = get_op_names();
     for(i=0; i < maxo; ++i) {
        SV *sv;
        sv = newSViv(i);
        SvREADONLY_on(sv);
-       hv_store(op_named_bits, op_name[i], strlen(op_name[i]), sv, 0);
+       hv_store(op_named_bits, op_names[i], strlen(op_names[i]), sv, 0);
     }
 
     put_op_bitspec(":none",0, sv_2mortal(new_opset(Nullsv)));
@@ -290,7 +291,7 @@ opset_to_ops(opset, desc = 0)
     STRLEN len;
     int i, j, myopcode;
     char *bitmap = SvPV(opset, len);
-    char **names = (desc) ? op_desc : op_name;
+    char **names = (desc) ? get_op_descs() : get_op_names();
     verify_opset(opset,1);
     for (myopcode=0, i=0; i < opset_len; i++) {
        U16 bits = bitmap[i];
@@ -375,6 +376,7 @@ opdesc(...)
     int i, myopcode;
     STRLEN len;
     SV **args;
+    char **op_desc = get_op_descs(); 
     /* copy args to a scratch area since we may push output values onto        */
     /* the stack faster than we read values off it if masks are used.  */
     args = (SV**)SvPVX(sv_2mortal(newSVpv((char*)&ST(0), items*sizeof(SV*))));
index 4457a38..dfb2f3a 100644 (file)
@@ -35,6 +35,8 @@ find_threadsv
 fold
 fold_locale
 freq
+get_op_descs
+get_op_names
 ge_amg
 gt_amg
 hexdigit
diff --git a/perl.h b/perl.h
index 09d64af..3d8e423 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -1394,11 +1394,11 @@ EXT short *     ds;
 EXT char *     dc;
 
 /* handy constants */
-EXTCONST char *        Yes INIT("1");
-EXTCONST char *        No INIT("");
-EXTCONST char *        hexdigit INIT("0123456789abcdef0123456789ABCDEFx");
-EXTCONST char *        patleave INIT("\\.^$@dDwWsSbB+*?|()-nrtfeaxc0123456789[{]}");
-EXTCONST char *        vert INIT("|");
+#define        Perl_Yes        "1"
+#define Perl_No                ""
+#define Perl_hexdigit  "0123456789abcdef0123456789ABCDEFx"
+#define Perl_patleave  "\\.^$@dDwWsSbB+*?|()-nrtfeaxc0123456789[{]}"
+#define Perl_vert      "|"
 
 EXTCONST char warn_uninit[]
   INIT("Use of uninitialized value");
diff --git a/proto.h b/proto.h
index fa551b9..a454a51 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -72,6 +72,8 @@ void  cx_dump _((PERL_CONTEXT* cs));
 SV*    filter_add _((filter_t funcp, SV* datasv));
 void   filter_del _((filter_t funcp));
 I32    filter_read _((int idx, SV* buffer, int maxlen));
+char **        get_op_descs _((void));
+char **        get_op_names _((void));
 I32    cxinc _((void));
 void   deb _((const char* pat,...)) __attribute__((format(printf,1,2)));
 void   deb_growlevel _((void));
diff --git a/util.c b/util.c
index 81035b9..cb7a4f1 100644 (file)
--- a/util.c
+++ b/util.c
@@ -2553,4 +2553,16 @@ Perl_GetVars(void)
 {
  return &Perl_Vars;
 }
-#endif
\ No newline at end of file
+#endif
+
+char **
+get_op_names(void)
+{
+ return op_name;
+}
+
+char **
+get_op_descs(void)
+{
+ return op_desc;
+}
index 9b6cfe3..1bda71e 100644 (file)
@@ -167,6 +167,11 @@ Perl_wait4pid
 Perl_watch
 Perl_yyname
 Perl_yyrule
+Perl_Yes
+Perl_No
+Perl_hexdigit
+Perl_patleave
+Perl_vert
 allgvs
 curblock
 curcsv