[pypy-svn] r49005 - in pypy/dist/pypy/rpython/module: . test
xoraxax at codespeak.net
xoraxax at codespeak.net
Fri Nov 23 19:57:30 CET 2007
Author: xoraxax
Date: Fri Nov 23 19:57:30 2007
New Revision: 49005
Modified:
pypy/dist/pypy/rpython/module/ll_os.py
pypy/dist/pypy/rpython/module/test/test_posix.py
Log:
Fix naming of the macro wrappers.
Modified: pypy/dist/pypy/rpython/module/ll_os.py
==============================================================================
--- pypy/dist/pypy/rpython/module/ll_os.py (original)
+++ pypy/dist/pypy/rpython/module/ll_os.py Fri Nov 23 19:57:30 2007
@@ -72,10 +72,10 @@
# we need an indirection via c functions to get macro calls working on llvm
decl_snippet = """
- %(ret_type)s pypy_%(name)s (int status);
+ %(ret_type)s pypy_macro_wrapper_%(name)s (int status);
"""
def_snippet = """
- %(ret_type)s pypy_%(name)s (int status) {
+ %(ret_type)s pypy_macro_wrapper_%(name)s (int status) {
return %(name)s(status);
}
"""
@@ -1102,7 +1102,7 @@
return int(getattr(os, name)(status))
fake.func_name = 'fake_' + name
- os_c_func = self.llexternal("pypy_" + name, [lltype.Signed],
+ os_c_func = self.llexternal("pypy_macro_wrapper_" + name, [lltype.Signed],
lltype.Signed, includes=['pypy_os_macros.h'],
_callable=fake)
Modified: pypy/dist/pypy/rpython/module/test/test_posix.py
==============================================================================
--- pypy/dist/pypy/rpython/module/test/test_posix.py (original)
+++ pypy/dist/pypy/rpython/module/test/test_posix.py Fri Nov 23 19:57:30 2007
@@ -1,6 +1,8 @@
import py
from pypy.rpython.test.tool import BaseRtypingTest, LLRtypeMixin, OORtypeMixin
from pypy.tool.udir import udir
+from pypy.translator.llvm.test.runtest import compile_function as compile_llvm
+from pypy.translator.c.test.test_genc import compile
import os
exec 'import %s as posix' % os.name
@@ -138,9 +140,8 @@
py.test.skip("ootypesystem does not support os.fstat")
-def test_os_wstar():
+def os_wstar_tester(compile):
from pypy.rpython.module.ll_os import RegisterOs
- from pypy.translator.c.test.test_genc import compile
for name in RegisterOs.w_star:
if not hasattr(os, name):
continue
@@ -152,3 +153,6 @@
res = fun_c(value)
assert res == fun(value)
+def test_os_wstar():
+ yield os_wstar_tester, compile_llvm
+ yield os_wstar_tester, compile
More information about the Pypy-commit
mailing list