[pypy-commit] pypy win32-fixes3: back out changeset b4eed482703d
mattip
noreply at buildbot.pypy.org
Mon May 27 20:54:12 CEST 2013
Author: mattip <matti.picus at gmail.com>
Branch: win32-fixes3
Changeset: r64588:34ac4baf64a6
Date: 2013-05-27 21:42 +0300
http://bitbucket.org/pypy/pypy/changeset/34ac4baf64a6/
Log: back out changeset b4eed482703d
diff --git a/rpython/jit/backend/llgraph/runner.py b/rpython/jit/backend/llgraph/runner.py
--- a/rpython/jit/backend/llgraph/runner.py
+++ b/rpython/jit/backend/llgraph/runner.py
@@ -64,15 +64,14 @@
self.args = args
class CallDescr(AbstractDescr):
- def __init__(self, RESULT, ARGS, extrainfo, abi):
+ def __init__(self, RESULT, ARGS, extrainfo):
self.RESULT = RESULT
self.ARGS = ARGS
self.extrainfo = extrainfo
- self.abi = abi
def __repr__(self):
- return 'CallDescr(%r, %r, %r %r)' % (self.RESULT, self.ARGS,
- self.extrainfo, self.abi)
+ return 'CallDescr(%r, %r, %r)' % (self.RESULT, self.ARGS,
+ self.extrainfo)
def get_extra_info(self):
return self.extrainfo
@@ -291,14 +290,13 @@
# ------------------------------------------------------------
def calldescrof(self, FUNC, ARGS, RESULT, effect_info):
- abi = 0
key = ('call', getkind(RESULT),
tuple([getkind(A) for A in ARGS]),
- effect_info, abi)
+ effect_info)
try:
return self.descrs[key]
except KeyError:
- descr = CallDescr(RESULT, ARGS, effect_info, abi)
+ descr = CallDescr(RESULT, ARGS, effect_info)
self.descrs[key] = descr
return descr
@@ -364,7 +362,7 @@
try:
return self.descrs[key]
except KeyError:
- descr = CallDescr(RESULT, ARGS, extrainfo, cif_description.abi)
+ descr = CallDescr(RESULT, ARGS, extrainfo)
self.descrs[key] = descr
return descr
@@ -867,7 +865,7 @@
# graph, not to directly execute the python function
result = self.cpu.maybe_on_top_of_llinterp(func, call_args, descr.RESULT)
else:
- FUNC = lltype.FuncType(descr.ARGS, descr.RESULT, descr.abi)
+ FUNC = lltype.FuncType(descr.ARGS, descr.RESULT)
func_to_call = rffi.cast(lltype.Ptr(FUNC), func)
result = func_to_call(*call_args)
del self.force_guard_op
diff --git a/rpython/rlib/clibffi.py b/rpython/rlib/clibffi.py
--- a/rpython/rlib/clibffi.py
+++ b/rpython/rlib/clibffi.py
@@ -503,7 +503,6 @@
def __init__(self, name, argtypes, restype, flags=FUNCFLAG_CDECL):
self.name = name
- print 'AbstractFuncPtr of',name,'flags',flags,'FUNCFLAG_CDECL',FUNCFLAG_CDECL
self.argtypes = argtypes
self.restype = restype
self.flags = flags
diff --git a/rpython/rtyper/lltypesystem/ll2ctypes.py b/rpython/rtyper/lltypesystem/ll2ctypes.py
--- a/rpython/rtyper/lltypesystem/ll2ctypes.py
+++ b/rpython/rtyper/lltypesystem/ll2ctypes.py
@@ -362,16 +362,12 @@
restype = None
else:
restype = get_ctypes_type(T.TO.RESULT)
- if T.TO.CALL_CONV == ctypes._FUNCFLAG_STDCALL:
- rettype = ctypes.WINFUNCTYPE
- else:
- rettype = ctypes.CFUNCTYPE
try:
kwds = {'use_errno': True}
- return rettype(restype, *argtypes, **kwds)
+ return ctypes.CFUNCTYPE(restype, *argtypes, **kwds)
except TypeError:
# unexpected 'use_errno' argument, old ctypes version
- return rettype(restype, *argtypes)
+ return ctypes.CFUNCTYPE(restype, *argtypes)
elif isinstance(T.TO, lltype.OpaqueType):
return ctypes.c_void_p
else:
diff --git a/rpython/rtyper/lltypesystem/lltype.py b/rpython/rtyper/lltypesystem/lltype.py
--- a/rpython/rtyper/lltypesystem/lltype.py
+++ b/rpython/rtyper/lltypesystem/lltype.py
@@ -540,7 +540,7 @@
class FuncType(ContainerType):
_gckind = 'raw'
__name__ = 'func'
- def __init__(self, args, result, call_conv=0):
+ def __init__(self, args, result):
for arg in args:
assert isinstance(arg, LowLevelType)
# There are external C functions eating raw structures, not
@@ -550,7 +550,6 @@
if isinstance(result, ContainerType):
raise TypeError, "function result can only be primitive or pointer"
self.RESULT = result
- self.CALL_CONV = call_conv
def __str__(self):
args = ', '.join(map(str, self.ARGS))
More information about the pypy-commit
mailing list