develooper Front page | perl.cvs.mod_parrot | Postings from April 2009

[svn:mod_parrot] r627 - mod_parrot/trunk/lib/ModParrot/APR

From:
jhorwitz
Date:
April 21, 2009 09:15
Subject:
[svn:mod_parrot] r627 - mod_parrot/trunk/lib/ModParrot/APR
Message ID:
20090421161515.ED55E184470@xx12.develooper.com
Author: jhorwitz
Date: Tue Apr 21 09:15:13 2009
New Revision: 627

Modified:
   mod_parrot/trunk/lib/ModParrot/APR/Pool.pir

Log:
fix badness when passing null PMC as a double-pointer via NCI.  it reassigned
PMCNULL to the pool struct, which is bad.


Modified: mod_parrot/trunk/lib/ModParrot/APR/Pool.pir
==============================================================================
--- mod_parrot/trunk/lib/ModParrot/APR/Pool.pir	(original)
+++ mod_parrot/trunk/lib/ModParrot/APR/Pool.pir	Tue Apr 21 09:15:13 2009
@@ -74,8 +74,10 @@
     apr_pool_create = get_root_global [ 'APR'; 'NCI' ], "apr_pool_create_ex"
     null_ptr = get_root_global [ 'ModParrot'; 'NCI' ], "null"
     nul = null_ptr()
+    pool = new 'CPointer'
     $I0 = apr_pool_create(pool, nul, nul, nul)
     setattribute self, 'apr_pool', pool
+  no_self:
 .end
 
 .sub init_pmc :vtable :method
@@ -101,7 +103,7 @@
     # XXX should never get here, else we'd be in init()
     goto done
   have_parent:
-    null pool
+    pool = new 'CPointer'
     $P0 = getattribute parent_attr, 'apr_pool'
     $I0 = apr_pool_create(pool, $P0, nul, nul)
     setattribute self, 'apr_pool', pool



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About