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
85d2424f
Commit
85d2424f
authored
Mar 22, 2019
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify a variable name and simplify its usage.
parent
492fd0cf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+8
-6
No files found.
Cython/Compiler/ModuleNode.py
View file @
85d2424f
...
@@ -1284,9 +1284,11 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -1284,9 +1284,11 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
cpp_class_attrs
=
[
entry
for
entry
in
scope
.
var_entries
cpp_class_attrs
=
[
entry
for
entry
in
scope
.
var_entries
if
entry
.
type
.
is_cpp_class
]
if
entry
.
type
.
is_cpp_class
]
new_func_entry
=
scope
.
lookup_here
(
"__new__"
)
cinit_func_entry
=
scope
.
lookup_here
(
"__cinit__"
)
if
base_type
or
(
new_func_entry
and
new_func_entry
.
is_special
if
cinit_func_entry
and
not
cinit_func_entry
.
is_special
:
and
not
new_func_entry
.
trivial_signature
):
cinit_func_entry
=
None
if
base_type
or
(
cinit_func_entry
and
not
cinit_func_entry
.
trivial_signature
):
unused_marker
=
''
unused_marker
=
''
else
:
else
:
unused_marker
=
'CYTHON_UNUSED '
unused_marker
=
'CYTHON_UNUSED '
...
@@ -1394,14 +1396,14 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -1394,14 +1396,14 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
if
cclass_entry
.
cname
==
'__pyx_memoryviewslice'
:
if
cclass_entry
.
cname
==
'__pyx_memoryviewslice'
:
code
.
putln
(
"p->from_slice.memview = NULL;"
)
code
.
putln
(
"p->from_slice.memview = NULL;"
)
if
new_func_entry
and
new_func_entry
.
is_special
:
if
cinit_func_entry
:
if
new
_func_entry
.
trivial_signature
:
if
cinit
_func_entry
.
trivial_signature
:
cinit_args
=
"o, %s, NULL"
%
Naming
.
empty_tuple
cinit_args
=
"o, %s, NULL"
%
Naming
.
empty_tuple
else
:
else
:
cinit_args
=
"o, a, k"
cinit_args
=
"o, a, k"
needs_error_cleanup
=
True
needs_error_cleanup
=
True
code
.
putln
(
"if (unlikely(%s(%s) < 0)) goto bad;"
%
(
code
.
putln
(
"if (unlikely(%s(%s) < 0)) goto bad;"
%
(
new
_func_entry
.
func_cname
,
cinit_args
))
cinit
_func_entry
.
func_cname
,
cinit_args
))
code
.
putln
(
code
.
putln
(
"return o;"
)
"return o;"
)
...
...
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