Skip to content

Commit

Permalink
Merge branch 'master' of github.com:rurban/perl-compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
Reini Urban committed Dec 13, 2011
2 parents 68ded27 + 2b9c363 commit b3b3dab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ByteLoader/bytecode.h
Expand Up @@ -120,7 +120,7 @@ static int bget_swab = 0;
#define BGET_OR_CROAK(arg, type) STMT_START { \
if (BGET_FREAD(&arg, sizeof(type), 1) < 1) { \
Perl_croak(aTHX_ \
"EOF or error while trying to read %d bytes for %s", \
"EOF or error while trying to read %lu bytes for %s", \
sizeof(type), STRINGIFY(type)); \
} \
} STMT_END
Expand Down
6 changes: 4 additions & 2 deletions C.xs
Expand Up @@ -13,8 +13,10 @@
# define RX_EXTFLAGS(prog) ((prog)->extflags)
#endif

typedef struct magic* B__MAGIC;
typedef SV* B__REGEXP;
typedef struct magic *B__MAGIC;
#if PERL_VERSION >= 11
typedef struct p5rx *B__REGEXP;
#endif

static int
my_runops(pTHX)
Expand Down
6 changes: 3 additions & 3 deletions typemap
@@ -1,9 +1,9 @@
B::MAGIC T_MG_OBJ
B::REGEXP T_RX_OBJ
B::REGEXP T_RX_OBJ

INPUT
T_RX_OBJ
if (SvROK($arg)) {
if (SvROK($arg) && SvTYPE(SvRV($arg)) == SVt_REGEXP) {
IV tmp = SvIV((SV*)SvRV($arg));
$var = INT2PTR($type,tmp);
}
Expand All @@ -15,4 +15,4 @@ T_MG_OBJ
$var = INT2PTR($type,tmp);
}
else
croak(\"$var is not a reference to PVMG\")
croak(\"$var is not a reference\")

0 comments on commit b3b3dab

Please sign in to comment.