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
594e3bad
Commit
594e3bad
authored
Jul 31, 2011
by
Vitja Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mark unused cdef-function args with CYTHON_UNUSED
parent
5db9f262
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+6
-1
No files found.
Cython/Compiler/Nodes.py
View file @
594e3bad
...
@@ -1792,10 +1792,15 @@ class CFuncDefNode(FuncDefNode):
...
@@ -1792,10 +1792,15 @@ class CFuncDefNode(FuncDefNode):
return
False
return
False
def
generate_function_header
(
self
,
code
,
with_pymethdef
,
with_opt_args
=
1
,
with_dispatch
=
1
,
cname
=
None
):
def
generate_function_header
(
self
,
code
,
with_pymethdef
,
with_opt_args
=
1
,
with_dispatch
=
1
,
cname
=
None
):
scope
=
self
.
local_scope
arg_decls
=
[]
arg_decls
=
[]
type
=
self
.
type
type
=
self
.
type
for
arg
in
type
.
args
[:
len
(
type
.
args
)
-
type
.
optional_arg_count
]:
for
arg
in
type
.
args
[:
len
(
type
.
args
)
-
type
.
optional_arg_count
]:
arg_decls
.
append
(
arg
.
declaration_code
())
arg_decl
=
arg
.
declaration_code
()
entry
=
scope
.
lookup
(
arg
.
name
)
if
not
entry
.
cf_used
:
arg_decl
=
'CYTHON_UNUSED %s'
%
arg_decl
arg_decls
.
append
(
arg_decl
)
if
with_dispatch
and
self
.
overridable
:
if
with_dispatch
and
self
.
overridable
:
arg_decls
.
append
(
PyrexTypes
.
c_int_type
.
declaration_code
(
Naming
.
skip_dispatch_cname
))
arg_decls
.
append
(
PyrexTypes
.
c_int_type
.
declaration_code
(
Naming
.
skip_dispatch_cname
))
if
type
.
optional_arg_count
and
with_opt_args
:
if
type
.
optional_arg_count
and
with_opt_args
:
...
...
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