Author: Maciej Fijalkowski <fij...@gmail.com> Branch: Changeset: r50288:cfff5b5f0b13 Date: 2011-12-07 21:35 +0200 http://bitbucket.org/pypy/pypy/changeset/cfff5b5f0b13/
Log: Pass mode diff --git a/pypy/module/_ffi/interp_ffi.py b/pypy/module/_ffi/interp_ffi.py --- a/pypy/module/_ffi/interp_ffi.py +++ b/pypy/module/_ffi/interp_ffi.py @@ -457,14 +457,14 @@ # ======================================================================== class W_CDLL(Wrappable): - def __init__(self, space, name): + def __init__(self, space, name, mode): self.space = space if name is None: self.name = "<None>" else: self.name = name try: - self.cdll = libffi.CDLL(name) + self.cdll = libffi.CDLL(name, mode) except DLOpenError, e: raise operationerrfmt(space.w_OSError, '%s: %s', self.name, e.msg or 'unspecified error') @@ -492,9 +492,9 @@ "No symbol %s found in library %s", name, self.name) return space.wrap(address_as_uint) -@unwrap_spec(name='str_or_None') -def descr_new_cdll(space, w_type, name): - return space.wrap(W_CDLL(space, name)) +@unwrap_spec(name='str_or_None', mode=int) +def descr_new_cdll(space, w_type, name, mode=-1): + return space.wrap(W_CDLL(space, name, mode)) W_CDLL.typedef = TypeDef( _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit