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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
a3038580
Commit
a3038580
authored
Mar 02, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prevent generating empty code section during vtable setup
parent
ad40010c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
17 deletions
+18
-17
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+18
-17
No files found.
Cython/Compiler/ModuleNode.py
View file @
a3038580
...
...
@@ -1971,23 +1971,24 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
c_method_entries
=
[
entry
for
entry
in
type
.
scope
.
cfunc_entries
if
entry
.
func_cname
]
code
.
putln
(
'#if PY_MAJOR_VERSION >= 3'
)
for
meth_entry
in
c_method_entries
:
cast
=
meth_entry
.
type
.
signature_cast_string
()
code
.
putln
(
"%s.%s = %s%s;"
%
(
type
.
vtable_cname
,
meth_entry
.
cname
,
cast
,
meth_entry
.
func_cname
))
code
.
putln
(
'#else'
)
for
meth_entry
in
c_method_entries
:
code
.
putln
(
"*(void(**)(void))&%s.%s = (void(*)(void))%s;"
%
(
type
.
vtable_cname
,
meth_entry
.
cname
,
meth_entry
.
func_cname
))
code
.
putln
(
'#endif'
)
if
c_method_entries
:
code
.
putln
(
'#if PY_MAJOR_VERSION >= 3'
)
for
meth_entry
in
c_method_entries
:
cast
=
meth_entry
.
type
.
signature_cast_string
()
code
.
putln
(
"%s.%s = %s%s;"
%
(
type
.
vtable_cname
,
meth_entry
.
cname
,
cast
,
meth_entry
.
func_cname
))
code
.
putln
(
'#else'
)
for
meth_entry
in
c_method_entries
:
code
.
putln
(
"*(void(**)(void))&%s.%s = (void(*)(void))%s;"
%
(
type
.
vtable_cname
,
meth_entry
.
cname
,
meth_entry
.
func_cname
))
code
.
putln
(
'#endif'
)
def
generate_typeptr_assignment_code
(
self
,
entry
,
code
):
# Generate code to initialise the typeptr of an extension
...
...
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