Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Data-Util CPAN distribution.

Report information
The Basics
Id: 41204
Status: resolved
Priority: 0/
Queue: Data-Util

People
Owner: Nobody in particular
Requestors: taro.nishino [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.29_01
Fixed in: (no value)



Subject: Compilation failure under MS VC++ 7.0
Hi, Goro, As you can see from my cpan-testers report #2679989, unfortunately the compilation ended in failure. I'm not sure why VC++ 7.0 misunderstands the macro string(sv, len, name). May I ask you a favour? Could you modify DataUtil.xs a bit as follows? (Incidentally, considering VC++ 7.0 not supporting C99) --- DataUtil.xs.orig Tue Nov 25 02:34:44 2008 +++ DataUtil.xs Tue Nov 25 17:02:21 2008 @@ -6,8 +6,6 @@ #define MY_CXT_KEY "Data::Util::_guts" XS_VERSION -#define string(sv, len, name) (SvGETMAGIC(sv), (is_string(sv) ? NOOP : my_fail(aTHX_ name, sv)), SvPV_const(sv, len)) - typedef struct{ GV* universal_isa; @@ -697,9 +695,12 @@ for(i = 1; i < items; i += 2){ SV* as = ST(i); SV* code = ST(i+1); + CV* const code_cv = deref_cv(code); + const char* name; STRLEN namelen; - const char* const name = string(as, namelen, "a subroutine name"); - CV* const code_cv = deref_cv(code); + SvGETMAGIC(as); + is_string(as) ? NOOP : my_fail(aTHX_ "a subroutine name", as); + name = SvPV_const(as, namelen); if(SvTYPE(SvRV(code)) != SVt_PVCV){ /* overloaded object */ code = newRV_inc((SV*)code_cv); @@ -735,9 +736,13 @@ for(i = 1; i < items; i++){ STRLEN namelen; - const char* const name = string(ST(i), namelen, "a subroutine name"); - GV** const gvp = (GV**)hv_fetch(stash, name, namelen, FALSE); - CV* code; + const char* name; + CV* code; + GV** gvp; + SvGETMAGIC(ST(i)); + is_string(ST(i)) ? NOOP : my_fail(aTHX_ "a subroutine name", ST(i)); + name = SvPV_const(ST(i), namelen); + gvp = (GV**)hv_fetch(stash, name, namelen, FALSE); if(!gvp) continue; @@ -856,11 +861,14 @@ for(i = 1; i < items; i += 2){ /* modifier_type => [subroutine(s)] */ STRLEN mt_len; - const char* const modifier_type = string(ST(i), mt_len, "a modifer type"); AV* const subs = deref_av(ST(i+1)); I32 const subs_len = av_len(subs) + 1; AV* av = NULL; I32 j; + const char* modifier_type; + SvGETMAGIC(ST(i)); + is_string(ST(i)) ? NOOP : my_fail(aTHX_ "a modifer type", ST(i)); + modifier_type = SvPV_const(ST(i), mt_len); if(strEQ(modifier_type, "before")){ av = before; Best regards, Taro Nishino
Hi, Taro. Thanks to your report, I has changed the concept. Now it is portable. Regards, -- Goro Fuji (GFUJI at CPAN.org)
It has been resolved.