From: Brandon L Black Date: Mon, 16 Apr 2007 15:06:44 +0000 (+0000) Subject: 0.01_04, fix threads? X-Git-Tag: 0.02~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6c88cc6a6051a67355d64366d2fd83bf65cb7070;p=gitmo%2FClass-C3-XS.git 0.01_04, fix threads? --- diff --git a/ChangeLog b/ChangeLog index 042bc86..3534236 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ Revision history for Perl extension Class::C3::XS +0.01_04 Mon Apr 16, 2007 + Fix threads issue? + 0.01_03 Mon Apr 16, 2007 Fix AvARRAY lvalue issue diff --git a/XS.xs b/XS.xs index 7dd3695..c514524 100644 --- a/XS.xs +++ b/XS.xs @@ -8,9 +8,6 @@ internals. */ -/* This is %next::METHOD_CACHE */ -STATIC HV* nmcache; - AV* __mro_linear_isa_c3(pTHX_ HV* stash, HV* cache, I32 level) { @@ -175,6 +172,7 @@ __nextcan(pTHX_ SV* self, I32 throw_nomethod) CV* cand_cv = NULL; const char *hvname; I32 items; + HV* nmcache; HE* cache_entry; SV* cachekey; @@ -255,6 +253,7 @@ __nextcan(pTHX_ SV* self, I32 throw_nomethod) sv_catpvn(cachekey, "|", 1); sv_catsv(cachekey, sv); + nmcache = get_hv("next::METHOD_CACHE", 1); if((cache_entry = hv_fetch_ent(nmcache, cachekey, 0, 0))) { SV* val = HeVAL(cache_entry); if(val == &PL_sv_undef) { @@ -435,7 +434,6 @@ XS(XS_maybe_next_method) MODULE = Class::C3::XS PACKAGE = Class::C3::XS BOOT: - nmcache = get_hv("next::METHOD_CACHE", 1); newXS("Class::C3::XS::calculateMRO", XS_Class_C3_XS_calculateMRO, __FILE__); newXS("next::can", XS_next_can, __FILE__); newXS("next::method", XS_next_method, __FILE__); diff --git a/lib/Class/C3/XS.pm b/lib/Class/C3/XS.pm index 923762b..71a8aad 100644 --- a/lib/Class/C3/XS.pm +++ b/lib/Class/C3/XS.pm @@ -1,6 +1,6 @@ package Class::C3::XS; -our $VERSION = '0.01_03'; +our $VERSION = '0.01_04'; =pod