Author: Ronan Lamy <[email protected]>
Branch: cpyext-cleanup
Changeset: r89365:4bb393bf3f37
Date: 2017-01-04 15:52 +0000
http://bitbucket.org/pypy/pypy/changeset/4bb393bf3f37/

Log:    Use unmangled names in generated code

diff --git a/pypy/module/cpyext/api.py b/pypy/module/cpyext/api.py
--- a/pypy/module/cpyext/api.py
+++ b/pypy/module/cpyext/api.py
@@ -1258,14 +1258,14 @@
             assert _name is not None, 'error converting %s' % name
             header.append("#define %s %s" % (name, _name))
             restype, args = c_function_signature(db, func)
-            header.append("PyAPI_FUNC(%s) %s(%s);" % (restype, _name, args))
+            header.append("PyAPI_FUNC(%s) %s(%s);" % (restype, name, args))
             if not translating:
                 callargs = ', '.join('arg%d' % (i,)
                                     for i in range(len(func.argtypes)))
                 if func.restype is lltype.Void:
-                    body = "{ _pypyAPI.%s(%s); }" % (_name, callargs)
+                    body = "{ _pypyAPI.%s(%s); }" % (name, callargs)
                 else:
-                    body = "{ return _pypyAPI.%s(%s); }" % (_name, callargs)
+                    body = "{ return _pypyAPI.%s(%s); }" % (name, callargs)
                 functions.append('%s %s(%s)\n%s' % (restype, name, args, body))
 
     for name in VA_TP_LIST:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to