void freadpv _((U32, void *));
EXT SV *sv;
+#ifndef USE_THREADS
EXT OP *op;
+#endif
EXT XPV pv;
EXT void **obj_list;
#define BSET_hv_store(sv, arg) \
hv_store((HV*)sv, pv.xpv_pv, pv.xpv_cur, arg, 0)
#define BSET_pv_free(pv) Safefree(pv.xpv_pv)
-#define BSET_pregcomp(op, arg) \
- cPMOP->op_pmregexp = arg ? pregcomp(arg, arg + pv.xpv_cur, cPMOP) : 0
+#define BSET_pregcomp(o, arg) \
+ ((PMOP*)o)->op_pmregexp = arg ? \
+ pregcomp(arg, arg + pv.xpv_cur, ((PMOP*)o)) : 0
#define BSET_newsv(sv, arg) sv = NEWSV(666,0); SvUPGRADE(sv, arg)
-#define BSET_newop(op, arg) op = (OP*)safemalloc(optype_size[arg])
-#define BSET_newopn(op, arg) do { \
- OP *oldop = op; \
- BSET_newop(op, arg); \
- oldop->op_next = op; \
+#define BSET_newop(o, arg) o = (OP*)safemalloc(optype_size[arg])
+#define BSET_newopn(o, arg) do { \
+ OP *oldop = o; \
+ BSET_newop(o, arg); \
+ oldop->op_next = o; \
} while (0)
#define BSET_ret(foo) return
* Kludge special-case workaround for OP_MAPSTART
* which needs the ppaddr for OP_GREPSTART. Blech.
*/
-#define BSET_op_type(op, arg) do { \
- op->op_type = arg; \
- op->op_ppaddr = (arg != OP_MAPSTART) ? ppaddr[arg] : pp_grepstart; \
+#define BSET_op_type(o, arg) do { \
+ o->op_type = arg; \
+ o->op_ppaddr = (arg != OP_MAPSTART) ? ppaddr[arg] : pp_grepstart; \
} while (0)
-#define BSET_op_ppaddr(op, arg) croak("op_ppaddr not yet implemented")
+#define BSET_op_ppaddr(o, arg) croak("op_ppaddr not yet implemented")
#define BSET_curpad(pad, arg) pad = AvARRAY(arg)
#define BSET_OBJ_STORE(obj, ix) \
my $c_header = <<'EOT';
/*
- * Copyright (c) 1996 Malcolm Beattie
+ * Copyright (c) 1996, 1997 Malcolm Beattie
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
FILE *fp;
#endif /* INDIRECT_BGET_MACROS */
{
+ dTHR;
int insn;
while ((insn = FGETC()) != EOF) {
switch (insn) {
void byterun _((FILE *));
#endif /* INDIRECT_BGET_MACROS */
+#ifndef PATCHLEVEL
+#include "patchlevel.h"
+#endif
+#if PATCHLEVEL < 4 || (PATCHLEVEL == 4 && SUBVERSION < 50)
+#define dTHR extern int errno
+#endif
+
enum {
EOT
/*
- * Copyright (c) 1996 Malcolm Beattie
+ * Copyright (c) 1996, 1997 Malcolm Beattie
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
FILE *fp;
#endif /* INDIRECT_BGET_MACROS */
{
+ dTHR;
int insn;
while ((insn = FGETC()) != EOF) {
switch (insn) {
/*
- * Copyright (c) 1996 Malcolm Beattie
+ * Copyright (c) 1996, 1997 Malcolm Beattie
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
void byterun _((FILE *));
#endif /* INDIRECT_BGET_MACROS */
+#ifndef PATCHLEVEL
+#include "patchlevel.h"
+#endif
+#if PATCHLEVEL < 4 || (PATCHLEVEL == 4 && SUBVERSION < 50)
+#define dTHR extern int errno
+#endif
+
enum {
INSN_RET, /* 0 */
INSN_LDSV, /* 1 */