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
Kirill Smelkov
cython
Commits
9817e3ca
Commit
9817e3ca
authored
9 years ago
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
be more explicit about "unused argument" marker in cases where it's only unused in non-CPython code
parent
decad243
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
+17
-7
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+8
-0
Cython/Utility/ObjectHandling.c
Cython/Utility/ObjectHandling.c
+9
-7
No files found.
Cython/Utility/ModuleSetupCode.c
View file @
9817e3ca
...
...
@@ -257,6 +257,14 @@ class __Pyx_FakeReference {
# endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
# define CYTHON_NCP_UNUSED
# else
# define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
typedef
struct
{
PyObject
**
p
;
char
*
s
;
const
Py_ssize_t
n
;
const
char
*
encoding
;
const
char
is_unicode
;
const
char
is_str
;
const
char
intern
;
}
__Pyx_StringTabEntry
;
/*proto*/
...
...
This diff is collapsed.
Click to expand it.
Cython/Utility/ObjectHandling.c
View file @
9817e3ca
...
...
@@ -279,7 +279,8 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j
{{
for
type
in
[
'
List
'
,
'
Tuple
'
]}}
static
CYTHON_INLINE
PyObject
*
__Pyx_GetItemInt_
{{
type
}}
_Fast
(
PyObject
*
o
,
Py_ssize_t
i
,
CYTHON_UNUSED
int
wraparound
,
CYTHON_UNUSED
int
boundscheck
)
{
CYTHON_NCP_UNUSED
int
wraparound
,
CYTHON_NCP_UNUSED
int
boundscheck
)
{
#if CYTHON_COMPILING_IN_CPYTHON
if
(
wraparound
&
unlikely
(
i
<
0
))
i
+=
Py
{{
type
}}
_GET_SIZE
(
o
);
if
((
!
boundscheck
)
||
likely
((
0
<=
i
)
&
(
i
<
Py
{{
type
}}
_GET_SIZE
(
o
))))
{
...
...
@@ -294,8 +295,9 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_{{type}}_Fast(PyObject *o, Py_ss
}
{{
endfor
}}
static
CYTHON_INLINE
PyObject
*
__Pyx_GetItemInt_Fast
(
PyObject
*
o
,
Py_ssize_t
i
,
int
is_list
,
CYTHON_UNUSED
int
wraparound
,
CYTHON_UNUSED
int
boundscheck
)
{
static
CYTHON_INLINE
PyObject
*
__Pyx_GetItemInt_Fast
(
PyObject
*
o
,
Py_ssize_t
i
,
int
is_list
,
CYTHON_NCP_UNUSED
int
wraparound
,
CYTHON_NCP_UNUSED
int
boundscheck
)
{
#if CYTHON_COMPILING_IN_CPYTHON
if
(
is_list
||
PyList_CheckExact
(
o
))
{
Py_ssize_t
n
=
((
!
wraparound
)
|
likely
(
i
>=
0
))
?
i
:
i
+
PyList_GET_SIZE
(
o
);
...
...
@@ -361,8 +363,8 @@ static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyOb
return
r
;
}
static
CYTHON_INLINE
int
__Pyx_SetItemInt_Fast
(
PyObject
*
o
,
Py_ssize_t
i
,
PyObject
*
v
,
int
is_list
,
CYTHON_UNUSED
int
wraparound
,
CYTHON
_UNUSED
int
boundscheck
)
{
static
CYTHON_INLINE
int
__Pyx_SetItemInt_Fast
(
PyObject
*
o
,
Py_ssize_t
i
,
PyObject
*
v
,
int
is_list
,
CYTHON_NCP_UNUSED
int
wraparound
,
CYTHON_NCP
_UNUSED
int
boundscheck
)
{
#if CYTHON_COMPILING_IN_CPYTHON
if
(
is_list
||
PyList_CheckExact
(
o
))
{
Py_ssize_t
n
=
(
!
wraparound
)
?
i
:
((
likely
(
i
>=
0
))
?
i
:
i
+
PyList_GET_SIZE
(
o
));
...
...
@@ -428,7 +430,7 @@ static CYTHON_INLINE int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) {
}
static
CYTHON_INLINE
int
__Pyx_DelItemInt_Fast
(
PyObject
*
o
,
Py_ssize_t
i
,
CYTHON_
UNUSED
int
is_list
,
CYTHON
_UNUSED
int
wraparound
)
{
CYTHON_
NCP_UNUSED
int
is_list
,
CYTHON_NCP
_UNUSED
int
wraparound
)
{
#if CYTHON_COMPILING_IN_PYPY
if
(
is_list
||
PySequence_Check
(
o
))
{
return
PySequence_DelItem
(
o
,
i
);
...
...
@@ -485,7 +487,7 @@ static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
PyObject
*
obj
,
PyObject
*
value
,
Py_ssize_t
cstart
,
Py_ssize_t
cstop
,
{{
endif
}}
PyObject
**
_py_start
,
PyObject
**
_py_stop
,
PyObject
**
_py_slice
,
int
has_cstart
,
int
has_cstop
,
CYTHON_UNUSED
int
wraparound
)
{
int
has_cstart
,
int
has_cstop
,
CYTHON_
NCP_
UNUSED
int
wraparound
)
{
#if CYTHON_COMPILING_IN_CPYTHON
PyMappingMethods
*
mp
;
#if PY_MAJOR_VERSION < 3
...
...
This diff is collapsed.
Click to expand it.
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