[pypy-svn] r75219 - pypy/branch/cpyext-init-cleanup/pypy/module/cpyext
afa at codespeak.net
afa at codespeak.net
Tue Jun 8 23:33:15 CEST 2010
Author: afa
Date: Tue Jun 8 23:33:14 2010
New Revision: 75219
Modified:
pypy/branch/cpyext-init-cleanup/pypy/module/cpyext/api.py
Log:
Fix import. This code will eventually move to another place.
Modified: pypy/branch/cpyext-init-cleanup/pypy/module/cpyext/api.py
==============================================================================
--- pypy/branch/cpyext-init-cleanup/pypy/module/cpyext/api.py (original)
+++ pypy/branch/cpyext-init-cleanup/pypy/module/cpyext/api.py Tue Jun 8 23:33:14 2010
@@ -374,6 +374,7 @@
return 'PyObject'
def get_struct_to_export(self, space, value):
+ from pypy.module.cpyext.pyobject import make_ref
value = make_ref(space, value)
return value._obj
@@ -420,6 +421,7 @@
return 'PyObject*'
def get_value_to_export(self, space, value):
+ from pypy.module.cpyext.pyobject import make_ref
from pypy.module.cpyext.typeobjectdefs import PyTypeObjectPtr
return rffi.cast(PyTypeObjectPtr, make_ref(space, value))._obj
@@ -443,6 +445,7 @@
return 'PyTypeObject'
def get_value_to_export(self, space, value):
+ from pypy.module.cpyext.pyobject import make_ref
from pypy.module.cpyext.typeobjectdefs import PyTypeObjectPtr
return rffi.cast(PyTypeObjectPtr, make_ref(space, value))._obj
More information about the Pypy-commit
mailing list