diff options
author | Tal Einat <taleinat+github@gmail.com> | 2018-07-06 10:17:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-06 10:17:38 (GMT) |
commit | c929df3b96c8d7e7977e581431192be21cdafd19 (patch) | |
tree | 0a6bf2366a1b3319cc1b4f5b36b5d1d7260560a2 /Objects/bytesobject.c | |
parent | 7943c5e8b525694b837d097d0fcce5097efc5626 (diff) | |
download | cpython-c929df3b96c8d7e7977e581431192be21cdafd19.zip cpython-c929df3b96c8d7e7977e581431192be21cdafd19.tar.gz cpython-c929df3b96c8d7e7977e581431192be21cdafd19.tar.bz2 |
bpo-20180: complete AC conversion of Objects/stringlib/transmogrify.h (GH-8039)
* converted bytes methods: expandtabs, ljust, rjust, center, zfill
* updated char_convertor to properly set the C default value
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r-- | Objects/bytesobject.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index f5bd5fb..943c329 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -2441,15 +2441,13 @@ bytes_methods[] = { {"__getnewargs__", (PyCFunction)bytes_getnewargs, METH_NOARGS}, {"capitalize", stringlib_capitalize, METH_NOARGS, _Py_capitalize__doc__}, - {"center", (PyCFunction)stringlib_center, METH_VARARGS, - _Py_center__doc__}, + STRINGLIB_CENTER_METHODDEF {"count", (PyCFunction)bytes_count, METH_VARARGS, _Py_count__doc__}, BYTES_DECODE_METHODDEF {"endswith", (PyCFunction)bytes_endswith, METH_VARARGS, _Py_endswith__doc__}, - {"expandtabs", (PyCFunction)stringlib_expandtabs, METH_VARARGS | METH_KEYWORDS, - _Py_expandtabs__doc__}, + STRINGLIB_EXPANDTABS_METHODDEF {"find", (PyCFunction)bytes_find, METH_VARARGS, _Py_find__doc__}, BYTES_FROMHEX_METHODDEF @@ -2472,7 +2470,7 @@ bytes_methods[] = { {"isupper", stringlib_isupper, METH_NOARGS, _Py_isupper__doc__}, BYTES_JOIN_METHODDEF - {"ljust", (PyCFunction)stringlib_ljust, METH_VARARGS, _Py_ljust__doc__}, + STRINGLIB_LJUST_METHODDEF {"lower", stringlib_lower, METH_NOARGS, _Py_lower__doc__}, BYTES_LSTRIP_METHODDEF BYTES_MAKETRANS_METHODDEF @@ -2480,7 +2478,7 @@ bytes_methods[] = { BYTES_REPLACE_METHODDEF {"rfind", (PyCFunction)bytes_rfind, METH_VARARGS, _Py_rfind__doc__}, {"rindex", (PyCFunction)bytes_rindex, METH_VARARGS, _Py_rindex__doc__}, - {"rjust", (PyCFunction)stringlib_rjust, METH_VARARGS, _Py_rjust__doc__}, + STRINGLIB_RJUST_METHODDEF BYTES_RPARTITION_METHODDEF BYTES_RSPLIT_METHODDEF BYTES_RSTRIP_METHODDEF @@ -2494,7 +2492,7 @@ bytes_methods[] = { {"title", stringlib_title, METH_NOARGS, _Py_title__doc__}, BYTES_TRANSLATE_METHODDEF {"upper", stringlib_upper, METH_NOARGS, _Py_upper__doc__}, - {"zfill", (PyCFunction)stringlib_zfill, METH_VARARGS, _Py_zfill__doc__}, + STRINGLIB_ZFILL_METHODDEF {NULL, NULL} /* sentinel */ }; |