Subject: | adding pTHX_ |
Dear Salvador,
Depending on Perl implementation, even fprintf can actually be PerlIO_printf.
As such, dump_keys and dump_pos should be added pTHX_ as these parameters
if PERL_NO_GET_CONTEXT is defined.
In fact, on my perl, which is ActivePerl Build 817, compilation failed.
So I modified Packed.xs as follows:
--- Packed.xs.org Thu Jun 26 12:00:39 2008
+++ Packed.xs Thu Jun 26 15:12:43 2008
@@ -23,7 +23,7 @@
#define CUTOFF 16
static void
-dump_keys(char *name, unsigned char *pv, UV nelems, UV record_size, UV offset) {
+dump_keys(pTHX_ char *name, unsigned char *pv, UV nelems, UV record_size, UV offset) {
int i;
fprintf(stderr, "%s\n", name);
for (i = 0; i < nelems; i++) {
@@ -37,7 +37,7 @@
fprintf(stderr, "\n");
}
-dump_pos(UV *pos) {
+dump_pos(pTHX_ UV *pos) {
int i, last = 0;
fprintf(stderr, "\n\npos:");
for (i=0; i < 256; i++) {
Regards,
Taro Nishino