Author: Matti Picus <[email protected]>
Branch:
Changeset: r74464:bda954894395
Date: 2014-11-11 23:03 -0600
http://bitbucket.org/pypy/pypy/changeset/bda954894395/
Log: stdcall unavoidably mangles names in a dll
diff --git a/rpython/rlib/test/test_libffi.py b/rpython/rlib/test/test_libffi.py
--- a/rpython/rlib/test/test_libffi.py
+++ b/rpython/rlib/test/test_libffi.py
@@ -576,7 +576,9 @@
}
"""
libfoo = self.get_libfoo()
- func = (libfoo, 'std_diff_xy', [types.sint, types.signed],
types.sint)
+ # __stdcall without a DEF file decorates the name with the number
of bytes
+ # that the callee will remove from the call stack
+ func = (libfoo, '_std_diff_xy@8', [types.sint, types.signed],
types.sint)
try:
self.call(func, [50, 8], lltype.Signed)
except ValueError, e:
@@ -613,7 +615,9 @@
"""
from rpython.rlib.libffi import WinDLL
dll = WinDLL(self.libfoo_name)
- f_by_name = dll.getpointer('BBB_second_ordinal_function' ,[],
+ # __stdcall without a DEF file decorates the name with the number
of bytes
+ # that the callee will remove from the call stack
+ f_by_name = dll.getpointer('_BBB_second_ordinal_function@0' ,[],
types.uint)
f_by_ordinal = dll.getpointer_by_ordinal(2 ,[], types.uint)
print dir(f_by_name)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit