Commit c7bc0930 authored by Robert Bradshaw's avatar Robert Bradshaw

merge

parents 350f7692 1d080ecb
......@@ -1068,8 +1068,10 @@ class OptimizeBuiltinCalls(Visitor.EnvTransform):
# different types - may or may not lead to an error at runtime
return node
# FIXME: we could potentially look up the actual tp_new C method
# of the extension type and call that instead of the generic slot
# FIXME: we could potentially look up the actual tp_new C
# method of the extension type and call that instead of the
# generic slot. That would also allow us to pass parameters
# efficiently.
if not type_arg.type_entry:
# arbitrary variable, needs a None check for safety
......
# This file contains tests corresponding to of unresolved bugs,
# This file contains tests corresponding to unresolved bugs,
# which will be skipped in the normal testing run.
methodmangling_T5
......@@ -6,3 +6,4 @@ class_attribute_init_values_T18
numpy_ValueError_T172
unsignedbehaviour_T184
missing_baseclass_in_predecl_T262
tp_new_T454
......@@ -26,7 +26,7 @@ class MyTypeSubClass(MyType):
def __init__(self):
print "INIT"
# only this can be safely optimised:
# only these can be safely optimised:
@cython.test_assert_path_exists('//PythonCapiCallNode')
@cython.test_fail_if_path_exists('//SimpleCallNode/AttributeNode')
......
cimport cython
cdef class TypeWithFactory:
@cython.test_assert_path_exists('//PythonCapiCallNode')
@cython.test_fail_if_path_exists('//SimpleCallNode/AttributeNode')
@classmethod
def new(cls):
return cls.__new__(cls)
def make_new_factory():
"""
>>> isinstance(make_new_factory(), TypeWithFactory)
True
"""
return TypeWithFactory.new()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment