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
09ac77a0
Commit
09ac77a0
authored
Jun 15, 2018
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix several internal function signatures that lead to warnings in gcc-8.
parent
e16a1648
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
22 deletions
+24
-22
CHANGES.rst
CHANGES.rst
+2
-0
Cython/Utility/Coroutine.c
Cython/Utility/Coroutine.c
+5
-5
Cython/Utility/CythonFunction.c
Cython/Utility/CythonFunction.c
+17
-17
No files found.
CHANGES.rst
View file @
09ac77a0
...
...
@@ -47,6 +47,8 @@ Bugs fixed
* Fix declarations of builtin or C types using strings in pure python mode.
(Github issue #2046)
* Several internal function signatures were fixed that lead to warnings in gcc-8.
Other changes
-------------
...
...
Cython/Utility/Coroutine.c
View file @
09ac77a0
...
...
@@ -1229,7 +1229,7 @@ static void __Pyx_Coroutine_del(PyObject *self) {
}
static
PyObject
*
__Pyx_Coroutine_get_name
(
__pyx_CoroutineObject
*
self
)
__Pyx_Coroutine_get_name
(
__pyx_CoroutineObject
*
self
,
CYTHON_UNUSED
void
*
context
)
{
PyObject
*
name
=
self
->
gi_name
;
// avoid NULL pointer dereference during garbage collection
...
...
@@ -1239,7 +1239,7 @@ __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self)
}
static
int
__Pyx_Coroutine_set_name
(
__pyx_CoroutineObject
*
self
,
PyObject
*
value
)
__Pyx_Coroutine_set_name
(
__pyx_CoroutineObject
*
self
,
PyObject
*
value
,
CYTHON_UNUSED
void
*
context
)
{
PyObject
*
tmp
;
...
...
@@ -1261,7 +1261,7 @@ __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value)
}
static
PyObject
*
__Pyx_Coroutine_get_qualname
(
__pyx_CoroutineObject
*
self
)
__Pyx_Coroutine_get_qualname
(
__pyx_CoroutineObject
*
self
,
CYTHON_UNUSED
void
*
context
)
{
PyObject
*
name
=
self
->
gi_qualname
;
// avoid NULL pointer dereference during garbage collection
...
...
@@ -1271,7 +1271,7 @@ __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self)
}
static
int
__Pyx_Coroutine_set_qualname
(
__pyx_CoroutineObject
*
self
,
PyObject
*
value
)
__Pyx_Coroutine_set_qualname
(
__pyx_CoroutineObject
*
self
,
PyObject
*
value
,
CYTHON_UNUSED
void
*
context
)
{
PyObject
*
tmp
;
...
...
@@ -1463,7 +1463,7 @@ static PyObject *__Pyx_Coroutine_await(PyObject *coroutine) {
}
static
PyObject
*
__Pyx_Coroutine_get_frame
(
CYTHON_UNUSED
__pyx_CoroutineObject
*
self
)
__Pyx_Coroutine_get_frame
(
CYTHON_UNUSED
__pyx_CoroutineObject
*
self
,
CYTHON_UNUSED
void
*
context
)
{
// Fake implementation that always returns None, but at least does not raise an AttributeError.
Py_RETURN_NONE
;
...
...
Cython/Utility/CythonFunction.c
View file @
09ac77a0
...
...
@@ -100,7 +100,7 @@ __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure
}
static
int
__Pyx_CyFunction_set_doc
(
__pyx_CyFunctionObject
*
op
,
PyObject
*
value
)
__Pyx_CyFunction_set_doc
(
__pyx_CyFunctionObject
*
op
,
PyObject
*
value
,
CYTHON_UNUSED
void
*
context
)
{
PyObject
*
tmp
=
op
->
func_doc
;
if
(
value
==
NULL
)
{
...
...
@@ -114,7 +114,7 @@ __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
}
static
PyObject
*
__Pyx_CyFunction_get_name
(
__pyx_CyFunctionObject
*
op
)
__Pyx_CyFunction_get_name
(
__pyx_CyFunctionObject
*
op
,
CYTHON_UNUSED
void
*
context
)
{
if
(
unlikely
(
op
->
func_name
==
NULL
))
{
#if PY_MAJOR_VERSION >= 3
...
...
@@ -130,7 +130,7 @@ __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
}
static
int
__Pyx_CyFunction_set_name
(
__pyx_CyFunctionObject
*
op
,
PyObject
*
value
)
__Pyx_CyFunction_set_name
(
__pyx_CyFunctionObject
*
op
,
PyObject
*
value
,
CYTHON_UNUSED
void
*
context
)
{
PyObject
*
tmp
;
...
...
@@ -152,14 +152,14 @@ __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
}
static
PyObject
*
__Pyx_CyFunction_get_qualname
(
__pyx_CyFunctionObject
*
op
)
__Pyx_CyFunction_get_qualname
(
__pyx_CyFunctionObject
*
op
,
CYTHON_UNUSED
void
*
context
)
{
Py_INCREF
(
op
->
func_qualname
);
return
op
->
func_qualname
;
}
static
int
__Pyx_CyFunction_set_qualname
(
__pyx_CyFunctionObject
*
op
,
PyObject
*
value
)
__Pyx_CyFunction_set_qualname
(
__pyx_CyFunctionObject
*
op
,
PyObject
*
value
,
CYTHON_UNUSED
void
*
context
)
{
PyObject
*
tmp
;
...
...
@@ -193,7 +193,7 @@ __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure
}
static
PyObject
*
__Pyx_CyFunction_get_dict
(
__pyx_CyFunctionObject
*
op
)
__Pyx_CyFunction_get_dict
(
__pyx_CyFunctionObject
*
op
,
CYTHON_UNUSED
void
*
context
)
{
if
(
unlikely
(
op
->
func_dict
==
NULL
))
{
op
->
func_dict
=
PyDict_New
();
...
...
@@ -205,7 +205,7 @@ __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
}
static
int
__Pyx_CyFunction_set_dict
(
__pyx_CyFunctionObject
*
op
,
PyObject
*
value
)
__Pyx_CyFunction_set_dict
(
__pyx_CyFunctionObject
*
op
,
PyObject
*
value
,
CYTHON_UNUSED
void
*
context
)
{
PyObject
*
tmp
;
...
...
@@ -227,21 +227,21 @@ __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
}
static
PyObject
*
__Pyx_CyFunction_get_globals
(
__pyx_CyFunctionObject
*
op
)
__Pyx_CyFunction_get_globals
(
__pyx_CyFunctionObject
*
op
,
CYTHON_UNUSED
void
*
context
)
{
Py_INCREF
(
op
->
func_globals
);
return
op
->
func_globals
;
}
static
PyObject
*
__Pyx_CyFunction_get_closure
(
CYTHON_UNUSED
__pyx_CyFunctionObject
*
op
)
__Pyx_CyFunction_get_closure
(
CYTHON_UNUSED
__pyx_CyFunctionObject
*
op
,
CYTHON_UNUSED
void
*
context
)
{
Py_INCREF
(
Py_None
);
return
Py_None
;
}
static
PyObject
*
__Pyx_CyFunction_get_code
(
__pyx_CyFunctionObject
*
op
)
__Pyx_CyFunction_get_code
(
__pyx_CyFunctionObject
*
op
,
CYTHON_UNUSED
void
*
context
)
{
PyObject
*
result
=
(
op
->
func_code
)
?
op
->
func_code
:
Py_None
;
Py_INCREF
(
result
);
...
...
@@ -274,7 +274,7 @@ __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
}
static
int
__Pyx_CyFunction_set_defaults
(
__pyx_CyFunctionObject
*
op
,
PyObject
*
value
)
{
__Pyx_CyFunction_set_defaults
(
__pyx_CyFunctionObject
*
op
,
PyObject
*
value
,
CYTHON_UNUSED
void
*
context
)
{
PyObject
*
tmp
;
if
(
!
value
)
{
// del => explicit None to prevent rebuilding
...
...
@@ -292,7 +292,7 @@ __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
}
static
PyObject
*
__Pyx_CyFunction_get_defaults
(
__pyx_CyFunctionObject
*
op
)
{
__Pyx_CyFunction_get_defaults
(
__pyx_CyFunctionObject
*
op
,
CYTHON_UNUSED
void
*
context
)
{
PyObject
*
result
=
op
->
defaults_tuple
;
if
(
unlikely
(
!
result
))
{
if
(
op
->
defaults_getter
)
{
...
...
@@ -307,7 +307,7 @@ __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
}
static
int
__Pyx_CyFunction_set_kwdefaults
(
__pyx_CyFunctionObject
*
op
,
PyObject
*
value
)
{
__Pyx_CyFunction_set_kwdefaults
(
__pyx_CyFunctionObject
*
op
,
PyObject
*
value
,
CYTHON_UNUSED
void
*
context
)
{
PyObject
*
tmp
;
if
(
!
value
)
{
// del => explicit None to prevent rebuilding
...
...
@@ -325,7 +325,7 @@ __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
}
static
PyObject
*
__Pyx_CyFunction_get_kwdefaults
(
__pyx_CyFunctionObject
*
op
)
{
__Pyx_CyFunction_get_kwdefaults
(
__pyx_CyFunctionObject
*
op
,
CYTHON_UNUSED
void
*
context
)
{
PyObject
*
result
=
op
->
defaults_kwdict
;
if
(
unlikely
(
!
result
))
{
if
(
op
->
defaults_getter
)
{
...
...
@@ -357,7 +357,7 @@ __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
}
static
PyObject
*
__Pyx_CyFunction_get_annotations
(
__pyx_CyFunctionObject
*
op
)
{
__Pyx_CyFunction_get_annotations
(
__pyx_CyFunctionObject
*
op
,
CYTHON_UNUSED
void
*
context
)
{
PyObject
*
result
=
op
->
func_annotations
;
if
(
unlikely
(
!
result
))
{
result
=
PyDict_New
();
...
...
@@ -370,7 +370,7 @@ __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
//#if PY_VERSION_HEX >= 0x030400C1
//static PyObject *
//__Pyx_CyFunction_get_signature(__pyx_CyFunctionObject *op) {
//__Pyx_CyFunction_get_signature(__pyx_CyFunctionObject *op
, CYTHON_UNUSED void *context
) {
// PyObject *inspect_module, *signature_class, *signature;
// // from inspect import Signature
// inspect_module = PyImport_ImportModuleLevelObject(PYIDENT("inspect"), NULL, NULL, NULL, 0);
...
...
@@ -593,7 +593,7 @@ static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, Py
return
(
*
meth
)(
self
,
arg
);
break
;
case
METH_VARARGS
|
METH_KEYWORDS
:
return
(
*
(
PyCFunctionWithKeywords
)
meth
)(
self
,
arg
,
kw
);
return
(
*
(
PyCFunctionWithKeywords
)
(
void
*
)
meth
)(
self
,
arg
,
kw
);
case
METH_NOARGS
:
if
(
likely
(
kw
==
NULL
||
PyDict_Size
(
kw
)
==
0
))
{
size
=
PyTuple_GET_SIZE
(
arg
);
...
...
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