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
7252a6e8
Commit
7252a6e8
authored
Jul 27, 2014
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #20179: Apply Argument Clinic to bytes and bytearray.
Patch by Tal Einat.
parent
e1b82531
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1872 additions
and
559 deletions
+1872
-559
Include/bytes_methods.h
Include/bytes_methods.h
+2
-2
Misc/NEWS
Misc/NEWS
+3
-0
Objects/bytearrayobject.c
Objects/bytearrayobject.c
+1149
-323
Objects/bytes_methods.c
Objects/bytes_methods.c
+2
-4
Objects/bytesobject.c
Objects/bytesobject.c
+716
-230
No files found.
Include/bytes_methods.h
View file @
7252a6e8
...
...
@@ -21,8 +21,8 @@ extern void _Py_bytes_title(char *result, char *s, Py_ssize_t len);
extern
void
_Py_bytes_capitalize
(
char
*
result
,
char
*
s
,
Py_ssize_t
len
);
extern
void
_Py_bytes_swapcase
(
char
*
result
,
char
*
s
,
Py_ssize_t
len
);
/* Th
is one gets the raw argument list
. */
extern
PyObject
*
_Py_bytes_maketrans
(
PyObject
*
args
);
/* Th
e maketrans() static method
. */
extern
PyObject
*
_Py_bytes_maketrans
(
PyObject
*
frm
,
PyObject
*
to
);
/* Shared __doc__ strings. */
extern
const
char
_Py_isspace__doc__
[];
...
...
Misc/NEWS
View file @
7252a6e8
...
...
@@ -10,6 +10,9 @@ Release date: TBA
Core and Builtins
-----------------
- Issue #20179: Apply Argument Clinic to bytes and bytearray.
Patch by Tal Einat.
- Issue #22082: Clear interned strings in slotdefs.
- Upgrade Unicode database to Unicode 7.0.0.
...
...
Objects/bytearrayobject.c
View file @
7252a6e8
This diff is collapsed.
Click to expand it.
Objects/bytes_methods.c
View file @
7252a6e8
...
...
@@ -382,9 +382,9 @@ _getbuffer(PyObject *obj, Py_buffer *view)
}
PyObject
*
_Py_bytes_maketrans
(
PyObject
*
args
)
_Py_bytes_maketrans
(
PyObject
*
frm
,
PyObject
*
to
)
{
PyObject
*
frm
,
*
to
,
*
res
=
NULL
;
PyObject
*
res
=
NULL
;
Py_buffer
bfrm
,
bto
;
Py_ssize_t
i
;
char
*
p
;
...
...
@@ -392,8 +392,6 @@ _Py_bytes_maketrans(PyObject *args)
bfrm
.
len
=
-
1
;
bto
.
len
=
-
1
;
if
(
!
PyArg_ParseTuple
(
args
,
"OO:maketrans"
,
&
frm
,
&
to
))
return
NULL
;
if
(
_getbuffer
(
frm
,
&
bfrm
)
<
0
)
return
NULL
;
if
(
_getbuffer
(
to
,
&
bto
)
<
0
)
...
...
Objects/bytesobject.c
View file @
7252a6e8
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