[pypy-commit] pypy win32-stdlib: fix merge
mattip
noreply at buildbot.pypy.org
Sun Jun 10 23:21:28 CEST 2012
Author: mattip <matti.picus at gmail.com>
Branch: win32-stdlib
Changeset: r55563:cd8455399d29
Date: 2012-06-11 00:09 +0300
http://bitbucket.org/pypy/pypy/changeset/cd8455399d29/
Log: fix merge
diff --git a/pypy/rlib/libffi.py b/pypy/rlib/libffi.py
--- a/pypy/rlib/libffi.py
+++ b/pypy/rlib/libffi.py
@@ -397,11 +397,6 @@
# ======================================================================
-def _dlsym_by_name_or_ord(lib, name):
- if isinstance(name, str):
- return dlsym(lib,name)
- else:
- return dlsym_byordinal(lib,name)
# XXX: it partially duplicate the code in clibffi.py
class CDLL(object):
@@ -417,8 +412,7 @@
self.lib = rffi.cast(DLLHANDLE, 0)
def getpointer(self, name, argtypes, restype, flags=FUNCFLAG_CDECL):
- return Func(name, argtypes, restype,
- _dlsym_by_name_or_ord(self.lib, name),
+ return Func(name, argtypes, restype, dlsym(self.lib, name),
flags=flags, keepalive=self)
def getpointer_by_ordinal(self, name, argtypes, restype,
@@ -432,8 +426,7 @@
if os.name == 'nt':
class WinDLL(CDLL):
def getpointer(self, name, argtypes, restype, flags=FUNCFLAG_STDCALL):
- return Func(name, argtypes, restype,
- _dlsym_by_name_or_ord(self.lib, name),
+ return Func(name, argtypes, restype, dlsym(self.lib, name),
flags=flags, keepalive=self)
def getpointer_by_ordinal(self, name, argtypes, restype,
flags=FUNCFLAG_STDCALL):
More information about the pypy-commit
mailing list