Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
a7ed57bc
Commit
a7ed57bc
authored
Jul 20, 2012
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix missing error when overriding final methods of cimported classes.
parent
6e18e71a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
5 deletions
+8
-5
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+4
-3
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+2
-1
Cython/Compiler/Parsing.py
Cython/Compiler/Parsing.py
+1
-0
Demos/setup.py
Demos/setup.py
+1
-1
No files found.
Cython/Compiler/ModuleNode.py
View file @
a7ed57bc
...
@@ -812,10 +812,11 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -812,10 +812,11 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
declaration
=
method_entry
.
type
.
declaration_code
(
declaration
=
method_entry
.
type
.
declaration_code
(
method_entry
.
final_func_cname
)
method_entry
.
final_func_cname
)
if
method_entry
.
func_modifiers
:
if
method_entry
.
func_modifiers
:
modifiers
=
"%s "
%
' '
.
join
(
method_entry
.
func_modifiers
).
upper
()
modifiers
=
" %s "
%
' '
.
join
(
method_entry
.
func_modifiers
).
upper
()
modifiers
=
modifiers
.
replace
(
" INLINE "
,
" CYTHON_INLINE "
)
else
:
else
:
modifiers
=
''
modifiers
=
" "
code
.
putln
(
"static
%s%s;"
%
(
modifiers
,
declaration
))
code
.
putln
(
"static%s%s;"
%
(
modifiers
,
declaration
))
def
generate_objstruct_predeclaration
(
self
,
type
,
code
):
def
generate_objstruct_predeclaration
(
self
,
type
,
code
):
if
not
type
.
scope
:
if
not
type
.
scope
:
...
...
Cython/Compiler/Nodes.py
View file @
a7ed57bc
...
@@ -1057,6 +1057,7 @@ class CVarDefNode(StatNode):
...
@@ -1057,6 +1057,7 @@ class CVarDefNode(StatNode):
# in_pxd boolean
# in_pxd boolean
# api boolean
# api boolean
# overridable boolean whether it is a cpdef
# overridable boolean whether it is a cpdef
# modifiers ['inline']
# decorators [cython.locals(...)] or None
# decorators [cython.locals(...)] or None
# directive_locals { string : NameNode } locals defined by cython.locals(...)
# directive_locals { string : NameNode } locals defined by cython.locals(...)
...
@@ -1102,7 +1103,7 @@ class CVarDefNode(StatNode):
...
@@ -1102,7 +1103,7 @@ class CVarDefNode(StatNode):
if
type
.
is_cfunction
:
if
type
.
is_cfunction
:
self
.
entry
=
dest_scope
.
declare_cfunction
(
name
,
type
,
declarator
.
pos
,
self
.
entry
=
dest_scope
.
declare_cfunction
(
name
,
type
,
declarator
.
pos
,
cname
=
cname
,
visibility
=
self
.
visibility
,
in_pxd
=
self
.
in_pxd
,
cname
=
cname
,
visibility
=
self
.
visibility
,
in_pxd
=
self
.
in_pxd
,
api
=
self
.
api
)
api
=
self
.
api
,
modifiers
=
self
.
modifiers
)
if
self
.
entry
is
not
None
:
if
self
.
entry
is
not
None
:
self
.
entry
.
is_overridable
=
self
.
overridable
self
.
entry
.
is_overridable
=
self
.
overridable
self
.
entry
.
directive_locals
=
copy
.
copy
(
self
.
directive_locals
)
self
.
entry
.
directive_locals
=
copy
.
copy
(
self
.
directive_locals
)
...
...
Cython/Compiler/Parsing.py
View file @
a7ed57bc
...
@@ -2736,6 +2736,7 @@ def p_c_func_or_var_declaration(s, pos, ctx):
...
@@ -2736,6 +2736,7 @@ def p_c_func_or_var_declaration(s, pos, ctx):
declarators
=
declarators
,
declarators
=
declarators
,
in_pxd
=
ctx
.
level
in
(
'module_pxd'
,
'c_class_pxd'
),
in_pxd
=
ctx
.
level
in
(
'module_pxd'
,
'c_class_pxd'
),
api
=
ctx
.
api
,
api
=
ctx
.
api
,
modifiers
=
modifiers
,
overridable
=
ctx
.
overridable
)
overridable
=
ctx
.
overridable
)
return
result
return
result
...
...
Demos/setup.py
View file @
a7ed57bc
...
@@ -8,7 +8,7 @@ from distutils.core import setup
...
@@ -8,7 +8,7 @@ from distutils.core import setup
from
distutils.extension
import
Extension
from
distutils.extension
import
Extension
from
Cython.Build
import
cythonize
from
Cython.Build
import
cythonize
ext_modules
=
cythonize
(
"*.pyx"
,
exclude
=
"numpy_*.pyx"
)
ext_modules
=
cythonize
(
"*
*/*
.pyx"
,
exclude
=
"numpy_*.pyx"
)
# Only compile the following if numpy is installed.
# Only compile the following if numpy is installed.
try
:
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment