Add aTHX_ as the first argument to functions that take pTHX_. Now compiles w/threads xs_attrs
Ævar Arnfjörð Bjarmason [Fri, 26 Mar 2010 22:19:06 +0000 (22:19 +0000)]
cmop/mop_attr.c
cmop/mop_instance.c

index e82b371..e4ae3fa 100644 (file)
@@ -302,12 +302,12 @@ mop_attr_destroy (mop_attr_t *attr)
 
 mop_attr_t *_attr_build_c_instance(SV *perl_attr) {
     mop_attr_t *attr = mop_attr_new_from_perl_attr(perl_attr);
-    mop_stash_in_mg(SvRV(perl_attr), NULL, (void *)attr, mop_attr_destroy);
+    mop_stash_in_mg(aTHX_ SvRV(perl_attr), NULL, (void *)attr, mop_attr_destroy);
     return attr;
 }
 
 mop_attr_t *mop_attr_get_c_instance (SV *perl_attr) {
-    mop_attr_t *attr = mop_get_stashed_ptr_in_mg(SvRV(perl_attr));
+    mop_attr_t *attr = mop_get_stashed_ptr_in_mg(aTHX_ SvRV(perl_attr));
 
     if ( attr )
         return attr;
index ed405b5..858ab9e 100644 (file)
@@ -100,12 +100,12 @@ mop_instance_destroy (mop_instance_t *instance)
 
 mop_instance_t *_instance_build_c_instance(SV *perl_instance) {
     mop_instance_t *instance = mop_instance_new_from_perl_instance(perl_instance);
-    mop_stash_in_mg(SvRV(perl_instance), NULL, (void *)instance, mop_instance_destroy);
+    mop_stash_in_mg(aTHX_ SvRV(perl_instance), NULL, (void *)instance, mop_instance_destroy);
     return instance;
 }
 
 mop_instance_t *mop_instance_get_c_instance (SV *perl_instance) {
-    mop_instance_t *instance = mop_get_stashed_ptr_in_mg(SvRV(perl_instance));
+    mop_instance_t *instance = mop_get_stashed_ptr_in_mg(aTHX_ SvRV(perl_instance));
 
     if ( instance )
         return instance;