new operator
authorDanilo Freitas <dsurviver@gmail.com>
Thu, 2 Jul 2009 05:04:41 +0000 (02:04 -0300)
committerDanilo Freitas <dsurviver@gmail.com>
Thu, 2 Jul 2009 05:04:41 +0000 (02:04 -0300)
Cython/Compiler/ExprNodes.py [changed mode: 0644->0755]
Cython/Compiler/PyrexTypes.py [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 13debae..1ef923c
@@ -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)
old mode 100644 (file)
new mode 100755 (executable)
index af3adf5..caf258c
@@ -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