code.error_goto_if_null(self.result(), self.pos)))
code.put_gotref(self.py_result())
+
class PyCFunctionNode(AtomicExprNode):
# Helper class used in the implementation of Python
# class definitions. Constructs a PyCFunction object
if self.is_py_operation():
self.gil_error()
-
def is_cpp_operation(self):
return self.operand.type.is_cpp_class
self.type_error()
return
self.type = function.type.return_type
-
class NotNode(ExprNode):
def py_operation_function(self):
return self.py_functions[self.operator]
-
py_functions = {
"|": "PyNumber_Or",
"%": "PyNumber_Remainder",
"**": "PyNumber_Power"
}
-
+
class IntBinopNode(NumBinopNode):
# Binary operation taking integer arguments.
self.operand2.analyse_types(env)
if self.is_cpp_comparison():
self.analyse_cpp_comparison(env)
- return
if self.cascade:
self.cascade.analyse_types(env)
self.operand2.annotate(code)
if self.cascade:
self.cascade.annotate(code)
-
+
class CascadedCmpNode(Node, CmpNode):
# A CascadedCmpNode is not a complete expression node. It
def analyse_expressions(self, env):
#print "StatListNode.analyse_expressions" ###
- entry = env.entries.get("cpp_sum", None)
for stat in self.stats:
stat.analyse_expressions(env)
cpdef p_compiler_directive_comments(PyrexScanner s)
cpdef p_module(PyrexScanner s, pxd, full_module_name)
cpdef p_cpp_class_definition(PyrexScanner s, ctx)
-
is_null_ptr = 1
-
class CReferenceType(CType):
is_reference = 1
return None
-
def widest_numeric_type(type1, type2):
# Given two numeric types, return the narrowest type
# encompassing both of them.