use more 'const' in the Encode data structures.
[p5sagit/p5-mst-13.2.git] / ext / ByteLoader / bytecode.h
index 087e151..b6bb12d 100644 (file)
@@ -31,7 +31,7 @@ typedef char *pvindex;
 #define BGET_PV(arg)   STMT_START {                                    \
        BGET_U32(arg);                                                  \
        if (arg) {                                                      \
-           New(666, bstate->bs_pv.pvx, arg, char);                     \
+           Newx(bstate->bs_pv.pvx, arg, char);                 \
            bl_read(bstate->bs_fdata, bstate->bs_pv.pvx, arg, 1);       \
            bstate->bs_pv.xpv.xpv_len = arg;                            \
            bstate->bs_pv.xpv.xpv_cur = arg - 1;                        \
@@ -63,7 +63,7 @@ typedef char *pvindex;
 #define BGET_op_tr_array(arg) do {                     \
        unsigned short *ary, len;                       \
        BGET_U16(len);                                  \
-       New(666, ary, len, unsigned short);             \
+       Newx(ary, len, unsigned short);         \
        BGET_FREAD(ary, sizeof(unsigned short), len);   \
        arg = (char *) ary;                             \
     } while (0)
@@ -347,6 +347,8 @@ typedef char *pvindex;
        mg_set(*hv_store(GvHV(gv_fetchpv("SIG", TRUE, SVt_PVHV)),       \
                name, strlen(name), cv, 0))
 
+#define BSET_xhv_name(hv, name)        hv_name_set((HV*)hv, name, strlen(name), 0)
+
 /* NOTE: the bytecode header only sanity-checks the bytecode. If a script cares about
  * what version of Perl it's being called under, it should do a 'use 5.006_001' or
  * equivalent. However, since the header includes checks requiring an exact match in