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):
...
@@ -1971,23 +1971,24 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
c_method_entries
=
[
c_method_entries
=
[
entry
for
entry
in
type
.
scope
.
cfunc_entries
entry
for
entry
in
type
.
scope
.
cfunc_entries
if
entry
.
func_cname
]
if
entry
.
func_cname
]
code
.
putln
(
'#if PY_MAJOR_VERSION >= 3'
)
if
c_method_entries
:
for
meth_entry
in
c_method_entries
:
code
.
putln
(
'#if PY_MAJOR_VERSION >= 3'
)
cast
=
meth_entry
.
type
.
signature_cast_string
()
for
meth_entry
in
c_method_entries
:
code
.
putln
(
cast
=
meth_entry
.
type
.
signature_cast_string
()
"%s.%s = %s%s;"
%
(
code
.
putln
(
type
.
vtable_cname
,
"%s.%s = %s%s;"
%
(
meth_entry
.
cname
,
type
.
vtable_cname
,
cast
,
meth_entry
.
cname
,
meth_entry
.
func_cname
))
cast
,
code
.
putln
(
'#else'
)
meth_entry
.
func_cname
))
for
meth_entry
in
c_method_entries
:
code
.
putln
(
'#else'
)
code
.
putln
(
for
meth_entry
in
c_method_entries
:
"*(void(**)(void))&%s.%s = (void(*)(void))%s;"
%
(
code
.
putln
(
type
.
vtable_cname
,
"*(void(**)(void))&%s.%s = (void(*)(void))%s;"
%
(
meth_entry
.
cname
,
type
.
vtable_cname
,
meth_entry
.
func_cname
))
meth_entry
.
cname
,
code
.
putln
(
'#endif'
)
meth_entry
.
func_cname
))
code
.
putln
(
'#endif'
)
def
generate_typeptr_assignment_code
(
self
,
entry
,
code
):
def
generate_typeptr_assignment_code
(
self
,
entry
,
code
):
# Generate code to initialise the typeptr of an extension
# 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