self.shape_entry = self.declare_cfunction('shape',
shape_func_type,
pos=None,
- visibility='extern',
+ defining = 1,
cname='<error>')
def create_cython_scope(context):
f = Utils.open_source_file(include_file_path, mode="rU")
source_desc = FileSourceDescriptor(include_file_path)
s2 = PyrexScanner(f, source_desc, s, source_encoding=f.encoding)
+ s2.parse_comments = s.parse_comments
try:
tree = p_statement_list(s2, ctx)
finally:
repr(s.sy), repr(s.systring)))
return body
-COMPILER_DIRECTIVE_COMMENT_RE = re.compile(r"^#\s*([a-z]+)\s*=(.*)$")
+COMPILER_DIRECTIVE_COMMENT_RE = re.compile(r"^#\s*cython:\s*([a-z]+)\s*=(.*)$")
def p_compiler_directive_comments(s):
result = {}
-# boundscheck = False
-# ignoreme = OK
+# cython: boundscheck = False
+# cython: ignoreme = OK
# This testcase is most useful if you inspect the generated C file
@cy.boundscheck(True)
def g(object[int, ndim=2] buf):
# The below line should have no meaning
-# boundscheck = False
+# cython: boundscheck = False
# even if the above line doesn't follow indentation.
print buf[3, 2] # bc
-# nonexistant = True
-# boundscheck = true
-# boundscheck = 9
+# cython: nonexistant = True
+# cython: boundscheck = true
+# cython: boundscheck = 9
print 3
# Options should not be interpreted any longer:
-# boundscheck = true
+# cython: boundscheck = true
_ERRORS = u"""
3:0: boundscheck directive must be set to True or False