Commit 4eb283b6 authored by Robert Bradshaw's avatar Robert Bradshaw

enable attribute access of cdef functions

parent 4e91e8fa
......@@ -22,7 +22,7 @@ Options:
-z, --pre-import <module> If specified, assume undeclared names in this
module. Emulates the behavior of putting
"from <module> import *" at the top of the file.
--incref_local_binop Force local an extra incref on local variables before
--incref-local-binop Force local an extra incref on local variables before
performing any binary operations.
"""
#The following experimental options are supported only on MacOSX:
......@@ -78,7 +78,7 @@ def parse_command_line(args):
Options.embed_pos_in_docstring = 1
elif option in ("-z", "--pre-import"):
Options.pre_import = pop_arg()
elif option == "--incref_local_binop":
elif option == "--incref-local-binop":
Options.incref_local_binop = 1
else:
bad_usage()
......
......@@ -1626,7 +1626,8 @@ class AttributeNode(ExprNode):
self.obj.analyse_types(env)
self.analyse_attribute(env)
if self.entry and self.entry.is_cmethod and not self.is_called:
error(self.pos, "C method can only be called")
# error(self.pos, "C method can only be called")
pass
## Reference to C array turns into pointer to first element.
#while self.type.is_array:
# self.type = self.type.element_ptr_type()
......@@ -2837,7 +2838,7 @@ class CmpNode:
and op not in ('is', 'is_not')):
return 1
else:
return 0
return type1.is_cfunction and type1.is_cfunction and type1 == type2
def generate_operation_code(self, code, result_code,
operand1, op , operand2):
......
......@@ -158,7 +158,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
module_list.append(env)
def generate_module_preamble(self, env, cimported_modules, code):
code.putln('/* Generated by Pyrex %s on %s */' % (
code.putln('/* Generated by Cython %s on %s */' % (
Version.version, time.asctime()))
code.putln('')
code.putln('#define PY_SSIZE_T_CLEAN')
......
version = '0.9.6.5'
version = '0.9.6.6'
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