Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
fc512e3e
Commit
fc512e3e
authored
Aug 02, 2018
by
jdemeyer
Committed by
INADA Naoki
Aug 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-34287: Do not use second argument of METH_NOARGS functions (GH-8582)
parent
dd74369c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
21 deletions
+21
-21
Modules/_io/bufferedio.c
Modules/_io/bufferedio.c
+21
-21
No files found.
Modules/_io/bufferedio.c
View file @
fc512e3e
...
...
@@ -403,7 +403,7 @@ buffered_dealloc(buffered *self)
}
static
PyObject
*
buffered_sizeof
(
buffered
*
self
,
void
*
unused
)
buffered_sizeof
(
buffered
*
self
,
PyObject
*
Py_UNUSED
(
ignored
)
)
{
Py_ssize_t
res
;
...
...
@@ -540,7 +540,7 @@ end:
/* detach */
static
PyObject
*
buffered_detach
(
buffered
*
self
,
PyObject
*
args
)
buffered_detach
(
buffered
*
self
,
PyObject
*
Py_UNUSED
(
ignored
)
)
{
PyObject
*
raw
,
*
res
;
CHECK_INITIALIZED
(
self
)
...
...
@@ -558,21 +558,21 @@ buffered_detach(buffered *self, PyObject *args)
/* Inquiries */
static
PyObject
*
buffered_seekable
(
buffered
*
self
,
PyObject
*
args
)
buffered_seekable
(
buffered
*
self
,
PyObject
*
Py_UNUSED
(
ignored
)
)
{
CHECK_INITIALIZED
(
self
)
return
PyObject_CallMethodObjArgs
(
self
->
raw
,
_PyIO_str_seekable
,
NULL
);
}
static
PyObject
*
buffered_readable
(
buffered
*
self
,
PyObject
*
args
)
buffered_readable
(
buffered
*
self
,
PyObject
*
Py_UNUSED
(
ignored
)
)
{
CHECK_INITIALIZED
(
self
)
return
PyObject_CallMethodObjArgs
(
self
->
raw
,
_PyIO_str_readable
,
NULL
);
}
static
PyObject
*
buffered_writable
(
buffered
*
self
,
PyObject
*
args
)
buffered_writable
(
buffered
*
self
,
PyObject
*
Py_UNUSED
(
ignored
)
)
{
CHECK_INITIALIZED
(
self
)
return
PyObject_CallMethodObjArgs
(
self
->
raw
,
_PyIO_str_writable
,
NULL
);
...
...
@@ -595,14 +595,14 @@ buffered_mode_get(buffered *self, void *context)
/* Lower-level APIs */
static
PyObject
*
buffered_fileno
(
buffered
*
self
,
PyObject
*
args
)
buffered_fileno
(
buffered
*
self
,
PyObject
*
Py_UNUSED
(
ignored
)
)
{
CHECK_INITIALIZED
(
self
)
return
PyObject_CallMethodObjArgs
(
self
->
raw
,
_PyIO_str_fileno
,
NULL
);
}
static
PyObject
*
buffered_isatty
(
buffered
*
self
,
PyObject
*
args
)
buffered_isatty
(
buffered
*
self
,
PyObject
*
Py_UNUSED
(
ignored
)
)
{
CHECK_INITIALIZED
(
self
)
return
PyObject_CallMethodObjArgs
(
self
->
raw
,
_PyIO_str_isatty
,
NULL
);
...
...
@@ -611,7 +611,7 @@ buffered_isatty(buffered *self, PyObject *args)
/* Serialization */
static
PyObject
*
buffered_getstate
(
buffered
*
self
,
PyObject
*
args
)
buffered_getstate
(
buffered
*
self
,
PyObject
*
Py_UNUSED
(
ignored
)
)
{
PyErr_Format
(
PyExc_TypeError
,
"cannot serialize '%s' object"
,
Py_TYPE
(
self
)
->
tp_name
);
...
...
@@ -1202,7 +1202,7 @@ _io__Buffered_readline_impl(buffered *self, Py_ssize_t size)
static
PyObject
*
buffered_tell
(
buffered
*
self
,
PyObject
*
args
)
buffered_tell
(
buffered
*
self
,
PyObject
*
Py_UNUSED
(
ignored
)
)
{
Py_off_t
pos
;
...
...
@@ -2207,33 +2207,33 @@ bufferedrwpair_write(rwpair *self, PyObject *args)
}
static
PyObject
*
bufferedrwpair_flush
(
rwpair
*
self
,
PyObject
*
args
)
bufferedrwpair_flush
(
rwpair
*
self
,
PyObject
*
Py_UNUSED
(
ignored
)
)
{
return
_forward_call
(
self
->
writer
,
&
PyId_flush
,
args
);
return
_forward_call
(
self
->
writer
,
&
PyId_flush
,
NULL
);
}
static
PyObject
*
bufferedrwpair_readable
(
rwpair
*
self
,
PyObject
*
args
)
bufferedrwpair_readable
(
rwpair
*
self
,
PyObject
*
Py_UNUSED
(
ignored
)
)
{
return
_forward_call
(
self
->
reader
,
&
PyId_readable
,
args
);
return
_forward_call
(
self
->
reader
,
&
PyId_readable
,
NULL
);
}
static
PyObject
*
bufferedrwpair_writable
(
rwpair
*
self
,
PyObject
*
args
)
bufferedrwpair_writable
(
rwpair
*
self
,
PyObject
*
Py_UNUSED
(
ignored
)
)
{
return
_forward_call
(
self
->
writer
,
&
PyId_writable
,
args
);
return
_forward_call
(
self
->
writer
,
&
PyId_writable
,
NULL
);
}
static
PyObject
*
bufferedrwpair_close
(
rwpair
*
self
,
PyObject
*
args
)
bufferedrwpair_close
(
rwpair
*
self
,
PyObject
*
Py_UNUSED
(
ignored
)
)
{
PyObject
*
exc
=
NULL
,
*
val
,
*
tb
;
PyObject
*
ret
=
_forward_call
(
self
->
writer
,
&
PyId_close
,
args
);
PyObject
*
ret
=
_forward_call
(
self
->
writer
,
&
PyId_close
,
NULL
);
if
(
ret
==
NULL
)
PyErr_Fetch
(
&
exc
,
&
val
,
&
tb
);
else
Py_DECREF
(
ret
);
ret
=
_forward_call
(
self
->
reader
,
&
PyId_close
,
args
);
ret
=
_forward_call
(
self
->
reader
,
&
PyId_close
,
NULL
);
if
(
exc
!=
NULL
)
{
_PyErr_ChainExceptions
(
exc
,
val
,
tb
);
Py_CLEAR
(
ret
);
...
...
@@ -2242,9 +2242,9 @@ bufferedrwpair_close(rwpair *self, PyObject *args)
}
static
PyObject
*
bufferedrwpair_isatty
(
rwpair
*
self
,
PyObject
*
args
)
bufferedrwpair_isatty
(
rwpair
*
self
,
PyObject
*
Py_UNUSED
(
ignored
)
)
{
PyObject
*
ret
=
_forward_call
(
self
->
writer
,
&
PyId_isatty
,
args
);
PyObject
*
ret
=
_forward_call
(
self
->
writer
,
&
PyId_isatty
,
NULL
);
if
(
ret
!=
Py_False
)
{
/* either True or exception */
...
...
@@ -2252,7 +2252,7 @@ bufferedrwpair_isatty(rwpair *self, PyObject *args)
}
Py_DECREF
(
ret
);
return
_forward_call
(
self
->
reader
,
&
PyId_isatty
,
args
);
return
_forward_call
(
self
->
reader
,
&
PyId_isatty
,
NULL
);
}
static
PyObject
*
...
...
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