From: Danilo Freitas Date: Thu, 2 Jul 2009 05:04:41 +0000 (-0300) Subject: new operator X-Git-Tag: 0.13.beta0~353^2~74 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=96e2964efe4dbea9ec329a617068e18d34f86938;p=cython.git new operator --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py old mode 100644 new mode 100755 index 13debaed..1ef923cb --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -2377,16 +2377,6 @@ class SimpleCallNode(CallNode): self.type = py_object_type self.gil_check(env) self.is_temp = 1 - if func_type.is_cpp_class: - for arg in self.args: - arg.analyse_types(env) - entry = env.lookup(self.function.cppclass) - print entry.name - self.type = entry.type - self.function.type = PyrexTypes.CppMethodType(self.function.cppclass, - PyrexTypes.CppClassType(self.function.cppclass, "cppclass", - entry.scope, 0, entry.cname, []), self.args) - self.analyse_c_function_call(env) else: for arg in self.args: arg.analyse_types(env) @@ -2410,7 +2400,7 @@ class SimpleCallNode(CallNode): def analyse_c_function_call(self, env): func_type = self.function_type() # Check function type - if not func_type.is_cfunction and not func_type.is_cpp_method: + if not func_type.is_cfunction: if not func_type.is_error: error(self.pos, "Calling non-function type '%s'" % func_type) diff --git a/Cython/Compiler/PyrexTypes.py b/Cython/Compiler/PyrexTypes.py old mode 100644 new mode 100755 index af3adf57..caf258ce --- a/Cython/Compiler/PyrexTypes.py +++ b/Cython/Compiler/PyrexTypes.py @@ -39,7 +39,6 @@ class PyrexType(BaseType): # is_ptr boolean Is a C pointer type # is_null_ptr boolean Is the type of NULL # is_cfunction boolean Is a C function type - # is_cpp_method boolean Is a C++ method type # is_struct_or_union boolean Is a C struct or union type # is_struct boolean Is a C struct type # is_enum boolean Is a C enum type @@ -91,7 +90,6 @@ class PyrexType(BaseType): is_ptr = 0 is_null_ptr = 0 is_cfunction = 0 - is_cpp_method = 0 is_struct_or_union = 0 is_cpp_class = 0 is_struct = 0 @@ -1230,28 +1228,6 @@ class CFuncType(CType): s = self.declaration_code("(*)", with_calling_convention=False) return '(%s)' % s -class CppMethodType(CFuncType): - - # return_type CppClassType - - is_cpp_method = 1 - - def __init__(self, class_name, return_type, args, has_varargs = 0, - exception_value = None, exception_check = 0, calling_convention = "", - nogil = 0, with_gil = 0, is_overridable = 0, optional_arg_count = 0): - self.class_name = class_name - self.return_type = return_type - self.args = args - self.has_varargs = has_varargs - self.exception_value = exception_value - self.exception_check = exception_check - self.calling_convention = calling_convention - self.nogil = nogil - self.with_gil = with_gil - self.is_overridable = is_overridable - self.optional_arg_count = optional_arg_count - - class CFuncTypeArg(object): # name string