summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2014-01-07 20:41:53 (GMT)
committerLarry Hastings <larry@hastings.org>2014-01-07 20:41:53 (GMT)
commit61272b77b0792318105bbdb6887a029b6a1743da (patch)
treec7842926f7938056074e083347c03ebb244650cf /Modules
parent9026113fd4acbb2fb77a900ae7bd921eebcc29c4 (diff)
downloadcpython-61272b77b0792318105bbdb6887a029b6a1743da.zip
cpython-61272b77b0792318105bbdb6887a029b6a1743da.tar.gz
cpython-61272b77b0792318105bbdb6887a029b6a1743da.tar.bz2
Issue #19273: The marker comments Argument Clinic uses have been changed
to improve readability.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_cursesmodule.c12
-rw-r--r--Modules/_datetimemodule.c12
-rw-r--r--Modules/_dbmmodule.c24
-rw-r--r--Modules/_opcode.c14
-rw-r--r--Modules/_pickle.c122
-rw-r--r--Modules/_weakref.c14
-rw-r--r--Modules/posixmodule.c30
-rw-r--r--Modules/unicodedata.c12
-rw-r--r--Modules/zlibmodule.c30
9 files changed, 135 insertions, 135 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 362618f..2a70337 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -134,11 +134,11 @@ typedef chtype attr_t; /* No attr_t type is available */
#define STRICT_SYSV_CURSES
#endif
-/*[clinic]
+/*[clinic input]
module curses
class curses.window
-[clinic]*/
-/*[clinic checksum: da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
+[clinic start generated code]*/
+/*[clinic end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
/* Definition of exception curses.error */
@@ -555,7 +555,7 @@ PyCursesWindow_Dealloc(PyCursesWindowObject *wo)
/* Addch, Addstr, Addnstr */
-/*[clinic]
+/*[clinic input]
curses.window.addch
@@ -581,7 +581,7 @@ Paint character ch at (y, x) with attributes attr,
overwriting any character previously painted at that location.
By default, the character position and attributes are the
current settings for the window object.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(curses_window_addch__doc__,
"addch([x, y,] ch, [attr])\n"
@@ -650,7 +650,7 @@ curses_window_addch(PyObject *self, PyObject *args)
static PyObject *
curses_window_addch_impl(PyObject *self, int group_left_1, int x, int y, PyObject *ch, int group_right_1, long attr)
-/*[clinic checksum: 44ed958b891cde91205e584c766e048f3999714f]*/
+/*[clinic end generated code: checksum=44ed958b891cde91205e584c766e048f3999714f]*/
{
PyCursesWindowObject *cwself = (PyCursesWindowObject *)self;
int coordinates_group = group_left_1;
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c
index b4d4e2f..0ea2256 100644
--- a/Modules/_datetimemodule.c
+++ b/Modules/_datetimemodule.c
@@ -16,11 +16,11 @@
#include "datetime.h"
#undef Py_BUILD_CORE
-/*[clinic]
+/*[clinic input]
module datetime
class datetime.datetime
-[clinic]*/
-/*[clinic checksum: da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
+[clinic start generated code]*/
+/*[clinic end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
/* We require that C int be at least 32 bits, and use int virtually
* everywhere. In just a few cases we use a temp long, where a Python
@@ -4145,7 +4145,7 @@ datetime_best_possible(PyObject *cls, TM_FUNC f, PyObject *tzinfo)
tzinfo);
}
-/*[clinic]
+/*[clinic input]
@classmethod
datetime.datetime.now
@@ -4156,7 +4156,7 @@ datetime.datetime.now
Returns new datetime object representing current time local to tz.
If no tz is specified, uses local timezone.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(datetime_datetime_now__doc__,
"now(tz=None)\n"
@@ -4192,7 +4192,7 @@ exit:
static PyObject *
datetime_datetime_now_impl(PyTypeObject *cls, PyObject *tz)
-/*[clinic checksum: ca3d26a423b3f633b260c7622e303f0915a96f7c]*/
+/*[clinic end generated code: checksum=ca3d26a423b3f633b260c7622e303f0915a96f7c]*/
{
PyObject *self;
diff --git a/Modules/_dbmmodule.c b/Modules/_dbmmodule.c
index f9a0e5e..c9e16e3 100644
--- a/Modules/_dbmmodule.c
+++ b/Modules/_dbmmodule.c
@@ -28,11 +28,11 @@ static char *which_dbm = "Berkeley DB";
#error "No ndbm.h available!"
#endif
-/*[clinic]
+/*[clinic input]
module dbm
class dbm.dbm
-[clinic]*/
-/*[clinic checksum: da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
+[clinic start generated code]*/
+/*[clinic end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
typedef struct {
PyObject_HEAD
@@ -49,13 +49,13 @@ static PyTypeObject Dbmtype;
static PyObject *DbmError;
-/*[python]
+/*[python input]
class dbmobject_converter(self_converter):
type = "dbmobject *"
def converter_init(self):
self.name = 'dp'
-[python]*/
-/*[python checksum: da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
+[python start generated code]*/
+/*[python end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
static PyObject *
newdbmobject(const char *file, int flags, int mode)
@@ -263,7 +263,7 @@ static PySequenceMethods dbm_as_sequence = {
0, /* sq_inplace_repeat */
};
-/*[clinic]
+/*[clinic input]
dbm.dbm.get
@@ -276,7 +276,7 @@ dbm.dbm.get
/
Return the value for key if present, otherwise default.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(dbm_dbm_get__doc__,
"get(key, [default])\n"
@@ -318,7 +318,7 @@ dbm_dbm_get(PyObject *self, PyObject *args)
static PyObject *
dbm_dbm_get_impl(dbmobject *dp, const char *key, Py_ssize_clean_t key_length, int group_right_1, PyObject *default_value)
-/*[clinic checksum: 28cf8928811bde51e535d67ae98ea039d79df717]*/
+/*[clinic end generated code: checksum=28cf8928811bde51e535d67ae98ea039d79df717]*/
{
datum dbm_key, val;
@@ -440,7 +440,7 @@ static PyTypeObject Dbmtype = {
/* ----------------------------------------------------------------- */
-/*[clinic]
+/*[clinic input]
dbm.open as dbmopen
@@ -458,7 +458,7 @@ dbm.open as dbmopen
Return a database object.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(dbmopen__doc__,
"open(filename, flags=\'r\', mode=0o666)\n"
@@ -498,7 +498,7 @@ exit:
static PyObject *
dbmopen_impl(PyModuleDef *module, const char *filename, const char *flags, int mode)
-/*[clinic checksum: fb265f75641553ccd963f84c143b35c11f9121fc]*/
+/*[clinic end generated code: checksum=fb265f75641553ccd963f84c143b35c11f9121fc]*/
{
int iflags;
diff --git a/Modules/_opcode.c b/Modules/_opcode.c
index 55cffe1..fe7f8ab 100644
--- a/Modules/_opcode.c
+++ b/Modules/_opcode.c
@@ -1,12 +1,12 @@
#include "Python.h"
#include "opcode.h"
-/*[clinic]
+/*[clinic input]
module _opcode
-[clinic]*/
-/*[clinic checksum: da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
+[clinic start generated code]*/
+/*[clinic end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
-/*[clinic]
+/*[clinic input]
_opcode.stack_effect -> int
@@ -18,7 +18,7 @@ _opcode.stack_effect -> int
/
Compute the stack effect of the opcode.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(_opcode_stack_effect__doc__,
"stack_effect(opcode, [oparg])\n"
@@ -64,10 +64,10 @@ exit:
static int
_opcode_stack_effect_impl(PyModuleDef *module, int opcode, int group_right_1, int oparg)
-/*[clinic checksum: e880e62dc7b0de73403026eaf4f8074aa106358b]*/
+/*[clinic end generated code: checksum=e880e62dc7b0de73403026eaf4f8074aa106358b]*/
{
int effect;
- if (HAS_ARG(opcode)) {
+ if (HAS_ARG(opcode)) {
if (!group_right_1) {
PyErr_SetString(PyExc_ValueError,
"stack_effect: opcode requires oparg but oparg was not specified");
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index 04a9837..917dd45 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -4,16 +4,16 @@
PyDoc_STRVAR(pickle_module_doc,
"Optimized C implementation for the Python pickle module.");
-/*[clinic]
+/*[clinic input]
module _pickle
class _pickle.Pickler
class _pickle.PicklerMemoProxy
class _pickle.Unpickler
class _pickle.UnpicklerMemoProxy
-[clinic]*/
-/*[clinic checksum: da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
+[clinic start generated code]*/
+/*[clinic end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
-/*[python]
+/*[python input]
class PicklerObject_converter(self_converter):
type = "PicklerObject *"
@@ -25,8 +25,8 @@ class UnpicklerObject_converter(self_converter):
class UnpicklerMemoProxyObject_converter(self_converter):
type = "UnpicklerMemoProxyObject *"
-[python]*/
-/*[python checksum: da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
+[python start generated code]*/
+/*[python end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
/* Bump this when new opcodes are added to the pickle protocol. */
enum {
@@ -140,7 +140,7 @@ typedef struct {
PyObject *PickleError;
PyObject *PicklingError;
PyObject *UnpicklingError;
-
+
/* copyreg.dispatch_table, {type_object: pickling_function} */
PyObject *dispatch_table;
@@ -1770,7 +1770,7 @@ save_long(PicklerObject *self, PyObject *obj)
else if (self->bin &&
(sizeof(long) <= 4 ||
(val <= 0x7fffffffL && val >= (-0x7fffffffL - 1)))) {
- /* result fits in a signed 4-byte integer.
+ /* result fits in a signed 4-byte integer.
Note: we can't use -0x80000000L in the above condition because some
compilers (e.g., MSVC) will promote 0x80000000L to an unsigned type
@@ -3492,21 +3492,21 @@ save_reduce(PicklerObject *self, PyObject *args, PyObject *obj)
cls = PyTuple_GET_ITEM(argtup, 0);
if (!PyType_Check(cls)) {
- PyErr_Format(st->PicklingError,
+ PyErr_Format(st->PicklingError,
"first item from NEWOBJ_EX argument tuple must "
"be a class, not %.200s", Py_TYPE(cls)->tp_name);
return -1;
}
args = PyTuple_GET_ITEM(argtup, 1);
if (!PyTuple_Check(args)) {
- PyErr_Format(st->PicklingError,
+ PyErr_Format(st->PicklingError,
"second item from NEWOBJ_EX argument tuple must "
"be a tuple, not %.200s", Py_TYPE(args)->tp_name);
return -1;
}
kwargs = PyTuple_GET_ITEM(argtup, 2);
if (!PyDict_Check(kwargs)) {
- PyErr_Format(st->PicklingError,
+ PyErr_Format(st->PicklingError,
"third item from NEWOBJ_EX argument tuple must "
"be a dict, not %.200s", Py_TYPE(kwargs)->tp_name);
return -1;
@@ -3874,7 +3874,7 @@ dump(PicklerObject *self, PyObject *obj)
return 0;
}
-/*[clinic]
+/*[clinic input]
_pickle.Pickler.clear_memo
@@ -3886,7 +3886,7 @@ The memo is the data structure that remembers which objects the
pickler has already seen, so that shared or recursive objects are
pickled by reference and not by value. This method is useful when
re-using picklers.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(_pickle_Pickler_clear_memo__doc__,
"clear_memo()\n"
@@ -3915,7 +3915,7 @@ _pickle_Pickler_clear_memo(PyObject *self, PyObject *Py_UNUSED(ignored))
static PyObject *
_pickle_Pickler_clear_memo_impl(PicklerObject *self)
-/*[clinic checksum: 0574593b102fffb8e781d7bb9b536ceffc525ac1]*/
+/*[clinic end generated code: checksum=0574593b102fffb8e781d7bb9b536ceffc525ac1]*/
{
if (self->memo)
PyMemoTable_Clear(self->memo);
@@ -3923,7 +3923,7 @@ _pickle_Pickler_clear_memo_impl(PicklerObject *self)
Py_RETURN_NONE;
}
-/*[clinic]
+/*[clinic input]
_pickle.Pickler.dump
@@ -3932,7 +3932,7 @@ _pickle.Pickler.dump
/
Write a pickled representation of the given object to the open file.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(_pickle_Pickler_dump__doc__,
"dump(obj)\n"
@@ -3943,7 +3943,7 @@ PyDoc_STRVAR(_pickle_Pickler_dump__doc__,
static PyObject *
_pickle_Pickler_dump(PicklerObject *self, PyObject *obj)
-/*[clinic checksum: b72a69ec98737fabf66dae7c5a3210178bdbd3e6]*/
+/*[clinic end generated code: checksum=b72a69ec98737fabf66dae7c5a3210178bdbd3e6]*/
{
/* Check whether the Pickler was initialized correctly (issue3664).
Developers often forget to call __init__() in their subclasses, which
@@ -4018,7 +4018,7 @@ Pickler_clear(PicklerObject *self)
}
-/*[clinic]
+/*[clinic input]
_pickle.Pickler.__init__
@@ -4045,7 +4045,7 @@ this interface.
If *fix_imports* is True and protocol is less than 3, pickle will try
to map the new Python 3 names to the old module names used in Python
2, so that the pickle data stream is readable with Python 2.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(_pickle_Pickler___init____doc__,
"__init__(file, protocol=None, fix_imports=True)\n"
@@ -4095,7 +4095,7 @@ exit:
static PyObject *
_pickle_Pickler___init___impl(PicklerObject *self, PyObject *file, PyObject *protocol, int fix_imports)
-/*[clinic checksum: 2b5ce6452544600478cf9f4b701ab9d9b5efbab9]*/
+/*[clinic end generated code: checksum=2b5ce6452544600478cf9f4b701ab9d9b5efbab9]*/
{
_Py_IDENTIFIER(persistent_id);
_Py_IDENTIFIER(dispatch_table);
@@ -4173,13 +4173,13 @@ typedef struct {
PicklerObject *pickler; /* Pickler whose memo table we're proxying. */
} PicklerMemoProxyObject;
-/*[clinic]
+/*[clinic input]
_pickle.PicklerMemoProxy.clear
self: PicklerMemoProxyObject
Remove all items from memo.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(_pickle_PicklerMemoProxy_clear__doc__,
"clear()\n"
@@ -4203,20 +4203,20 @@ _pickle_PicklerMemoProxy_clear(PyObject *self, PyObject *Py_UNUSED(ignored))
static PyObject *
_pickle_PicklerMemoProxy_clear_impl(PicklerMemoProxyObject *self)
-/*[clinic checksum: c6ca252530ccb3ea2f4b33507b51b183f23b24c7]*/
+/*[clinic end generated code: checksum=c6ca252530ccb3ea2f4b33507b51b183f23b24c7]*/
{
if (self->pickler->memo)
PyMemoTable_Clear(self->pickler->memo);
Py_RETURN_NONE;
}
-/*[clinic]
+/*[clinic input]
_pickle.PicklerMemoProxy.copy
self: PicklerMemoProxyObject
Copy the memo to a new object.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(_pickle_PicklerMemoProxy_copy__doc__,
"copy()\n"
@@ -4240,7 +4240,7 @@ _pickle_PicklerMemoProxy_copy(PyObject *self, PyObject *Py_UNUSED(ignored))
static PyObject *
_pickle_PicklerMemoProxy_copy_impl(PicklerMemoProxyObject *self)
-/*[clinic checksum: 808c4d5a37359ed5fb2efe81dbe5ff480719f470]*/
+/*[clinic end generated code: checksum=808c4d5a37359ed5fb2efe81dbe5ff480719f470]*/
{
Py_ssize_t i;
PyMemoTable *memo;
@@ -4277,13 +4277,13 @@ _pickle_PicklerMemoProxy_copy_impl(PicklerMemoProxyObject *self)
return NULL;
}
-/*[clinic]
+/*[clinic input]
_pickle.PicklerMemoProxy.__reduce__
self: PicklerMemoProxyObject
Implement pickle support.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(_pickle_PicklerMemoProxy___reduce____doc__,
"__reduce__()\n"
@@ -4307,7 +4307,7 @@ _pickle_PicklerMemoProxy___reduce__(PyObject *self, PyObject *Py_UNUSED(ignored)
static PyObject *
_pickle_PicklerMemoProxy___reduce___impl(PicklerMemoProxyObject *self)
-/*[clinic checksum: 2293152bdf53951a012d430767b608f5fb4213b5]*/
+/*[clinic end generated code: checksum=2293152bdf53951a012d430767b608f5fb4213b5]*/
{
PyObject *reduce_value, *dict_args;
PyObject *contents = _pickle_PicklerMemoProxy_copy_impl(self);
@@ -5348,12 +5348,12 @@ load_newobj_ex(UnpicklerObject *self)
Py_DECREF(args);
return -1;
}
-
+
if (!PyType_Check(cls)) {
Py_DECREF(kwargs);
Py_DECREF(args);
Py_DECREF(cls);
- PyErr_Format(st->UnpicklingError,
+ PyErr_Format(st->UnpicklingError,
"NEWOBJ_EX class argument must be a type, not %.200s",
Py_TYPE(cls)->tp_name);
return -1;
@@ -6317,7 +6317,7 @@ load(UnpicklerObject *self)
return value;
}
-/*[clinic]
+/*[clinic input]
_pickle.Unpickler.load
@@ -6326,7 +6326,7 @@ Load a pickle.
Read a pickled object representation from the open file object given
in the constructor, and return the reconstituted object hierarchy
specified therein.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(_pickle_Unpickler_load__doc__,
"load()\n"
@@ -6354,7 +6354,7 @@ _pickle_Unpickler_load(PyObject *self, PyObject *Py_UNUSED(ignored))
static PyObject *
_pickle_Unpickler_load_impl(PyObject *self)
-/*[clinic checksum: 55f35fcaf034817e75c355ec50b7878577355899]*/
+/*[clinic end generated code: checksum=55f35fcaf034817e75c355ec50b7878577355899]*/
{
UnpicklerObject *unpickler = (UnpicklerObject*)self;
@@ -6377,7 +6377,7 @@ _pickle_Unpickler_load_impl(PyObject *self)
function is used for loading any global (i.e., functions), not just
classes. The name is kept only for backward compatibility. */
-/*[clinic]
+/*[clinic input]
_pickle.Unpickler.find_class
@@ -6394,7 +6394,7 @@ functions).
This method is called whenever a class or a function object is
needed. Both arguments passed are str objects.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(_pickle_Unpickler_find_class__doc__,
"find_class(module_name, global_name)\n"
@@ -6432,7 +6432,7 @@ exit:
static PyObject *
_pickle_Unpickler_find_class_impl(UnpicklerObject *self, PyObject *module_name, PyObject *global_name)
-/*[clinic checksum: 1f353d13a32c9d94feb1466b3c2d0529a7e5650e]*/
+/*[clinic end generated code: checksum=1f353d13a32c9d94feb1466b3c2d0529a7e5650e]*/
{
PyObject *global;
PyObject *modules_dict;
@@ -6581,7 +6581,7 @@ Unpickler_clear(UnpicklerObject *self)
return 0;
}
-/*[clinic]
+/*[clinic input]
_pickle.Unpickler.__init__
@@ -6612,7 +6612,7 @@ map the old Python 2 names to the new names used in Python 3. The
instances pickled by Python 2; these default to 'ASCII' and 'strict',
respectively. The *encoding* can be 'bytes' to read these 8-bit
string instances as bytes objects.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(_pickle_Unpickler___init____doc__,
"__init__(file, *, fix_imports=True, encoding=\'ASCII\', errors=\'strict\')\n"
@@ -6665,7 +6665,7 @@ exit:
static PyObject *
_pickle_Unpickler___init___impl(UnpicklerObject *self, PyObject *file, int fix_imports, const char *encoding, const char *errors)
-/*[clinic checksum: 9ce6783224e220573d42a94fe1bb7199d6f1c5a6]*/
+/*[clinic end generated code: checksum=9ce6783224e220573d42a94fe1bb7199d6f1c5a6]*/
{
_Py_IDENTIFIER(persistent_load);
@@ -6737,13 +6737,13 @@ typedef struct {
UnpicklerObject *unpickler;
} UnpicklerMemoProxyObject;
-/*[clinic]
+/*[clinic input]
_pickle.UnpicklerMemoProxy.clear
self: UnpicklerMemoProxyObject
Remove all items from memo.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(_pickle_UnpicklerMemoProxy_clear__doc__,
"clear()\n"
@@ -6767,7 +6767,7 @@ _pickle_UnpicklerMemoProxy_clear(PyObject *self, PyObject *Py_UNUSED(ignored))
static PyObject *
_pickle_UnpicklerMemoProxy_clear_impl(UnpicklerMemoProxyObject *self)
-/*[clinic checksum: e0f99c26d48444a3f58f598bec3190c66595fce7]*/
+/*[clinic end generated code: checksum=e0f99c26d48444a3f58f598bec3190c66595fce7]*/
{
_Unpickler_MemoCleanup(self->unpickler);
self->unpickler->memo = _Unpickler_NewMemo(self->unpickler->memo_size);
@@ -6776,13 +6776,13 @@ _pickle_UnpicklerMemoProxy_clear_impl(UnpicklerMemoProxyObject *self)
Py_RETURN_NONE;
}
-/*[clinic]
+/*[clinic input]
_pickle.UnpicklerMemoProxy.copy
self: UnpicklerMemoProxyObject
Copy the memo to a new object.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(_pickle_UnpicklerMemoProxy_copy__doc__,
"copy()\n"
@@ -6806,7 +6806,7 @@ _pickle_UnpicklerMemoProxy_copy(PyObject *self, PyObject *Py_UNUSED(ignored))
static PyObject *
_pickle_UnpicklerMemoProxy_copy_impl(UnpicklerMemoProxyObject *self)
-/*[clinic checksum: 8c0ab91c0b694ea71a1774650898a760d1ab4765]*/
+/*[clinic end generated code: checksum=8c0ab91c0b694ea71a1774650898a760d1ab4765]*/
{
Py_ssize_t i;
PyObject *new_memo = PyDict_New();
@@ -6836,13 +6836,13 @@ error:
return NULL;
}
-/*[clinic]
+/*[clinic input]
_pickle.UnpicklerMemoProxy.__reduce__
self: UnpicklerMemoProxyObject
Implement pickling support.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(_pickle_UnpicklerMemoProxy___reduce____doc__,
"__reduce__()\n"
@@ -6866,7 +6866,7 @@ _pickle_UnpicklerMemoProxy___reduce__(PyObject *self, PyObject *Py_UNUSED(ignore
static PyObject *
_pickle_UnpicklerMemoProxy___reduce___impl(UnpicklerMemoProxyObject *self)
-/*[clinic checksum: 4ee76a65511291f0de2e9e63db395d2e5d6d8df6]*/
+/*[clinic end generated code: checksum=4ee76a65511291f0de2e9e63db395d2e5d6d8df6]*/
{
PyObject *reduce_value;
PyObject *constructor_args;
@@ -7141,7 +7141,7 @@ static PyTypeObject Unpickler_Type = {
0, /*tp_is_gc*/
};
-/*[clinic]
+/*[clinic input]
_pickle.dump
@@ -7172,7 +7172,7 @@ this interface.
If *fix_imports* is True and protocol is less than 3, pickle will try
to map the new Python 3 names to the old module names used in Python
2, so that the pickle data stream is readable with Python 2.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(_pickle_dump__doc__,
"dump(obj, file, protocol=None, *, fix_imports=True)\n"
@@ -7226,7 +7226,7 @@ exit:
static PyObject *
_pickle_dump_impl(PyModuleDef *module, PyObject *obj, PyObject *file, PyObject *protocol, int fix_imports)
-/*[clinic checksum: eb5c23e64da34477178230b704d2cc9c6b6650ea]*/
+/*[clinic end generated code: checksum=eb5c23e64da34477178230b704d2cc9c6b6650ea]*/
{
PicklerObject *pickler = _Pickler_New();
@@ -7253,7 +7253,7 @@ _pickle_dump_impl(PyModuleDef *module, PyObject *obj, PyObject *file, PyObject *
return NULL;
}
-/*[clinic]
+/*[clinic input]
_pickle.dumps
@@ -7275,7 +7275,7 @@ version of Python needed to read the pickle produced.
If *fix_imports* is True and *protocol* is less than 3, pickle will
try to map the new Python 3 names to the old module names used in
Python 2, so that the pickle data stream is readable with Python 2.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(_pickle_dumps__doc__,
"dumps(obj, protocol=None, *, fix_imports=True)\n"
@@ -7320,7 +7320,7 @@ exit:
static PyObject *
_pickle_dumps_impl(PyModuleDef *module, PyObject *obj, PyObject *protocol, int fix_imports)
-/*[clinic checksum: e9b915d61202a9692cb6c6718db74fe54fc9c4d1]*/
+/*[clinic end generated code: checksum=e9b915d61202a9692cb6c6718db74fe54fc9c4d1]*/
{
PyObject *result;
PicklerObject *pickler = _Pickler_New();
@@ -7343,7 +7343,7 @@ _pickle_dumps_impl(PyModuleDef *module, PyObject *obj, PyObject *protocol, int f
return NULL;
}
-/*[clinic]
+/*[clinic input]
_pickle.load
@@ -7376,7 +7376,7 @@ map the old Python 2 names to the new names used in Python 3. The
instances pickled by Python 2; these default to 'ASCII' and 'strict',
respectively. The *encoding* can be 'bytes' to read these 8-bit
string instances as bytes objects.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(_pickle_load__doc__,
"load(file, *, fix_imports=True, encoding=\'ASCII\', errors=\'strict\')\n"
@@ -7432,7 +7432,7 @@ exit:
static PyObject *
_pickle_load_impl(PyModuleDef *module, PyObject *file, int fix_imports, const char *encoding, const char *errors)
-/*[clinic checksum: b41f06970e57acf2fd602e4b7f88e3f3e1e53087]*/
+/*[clinic end generated code: checksum=b41f06970e57acf2fd602e4b7f88e3f3e1e53087]*/
{
PyObject *result;
UnpicklerObject *unpickler = _Unpickler_New();
@@ -7457,7 +7457,7 @@ _pickle_load_impl(PyModuleDef *module, PyObject *file, int fix_imports, const ch
return NULL;
}
-/*[clinic]
+/*[clinic input]
_pickle.loads
@@ -7481,7 +7481,7 @@ map the old Python 2 names to the new names used in Python 3. The
instances pickled by Python 2; these default to 'ASCII' and 'strict',
respectively. The *encoding* can be 'bytes' to read these 8-bit
string instances as bytes objects.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(_pickle_loads__doc__,
"loads(data, *, fix_imports=True, encoding=\'ASCII\', errors=\'strict\')\n"
@@ -7528,7 +7528,7 @@ exit:
static PyObject *
_pickle_loads_impl(PyModuleDef *module, PyObject *data, int fix_imports, const char *encoding, const char *errors)
-/*[clinic checksum: 0663de43aca6c21508a777e29d98c9c3a6e7f72d]*/
+/*[clinic end generated code: checksum=0663de43aca6c21508a777e29d98c9c3a6e7f72d]*/
{
PyObject *result;
UnpicklerObject *unpickler = _Unpickler_New();
diff --git a/Modules/_weakref.c b/Modules/_weakref.c
index 80de5da4..a73dcdb 100644
--- a/Modules/_weakref.c
+++ b/Modules/_weakref.c
@@ -4,12 +4,12 @@
#define GET_WEAKREFS_LISTPTR(o) \
((PyWeakReference **) PyObject_GET_WEAKREFS_LISTPTR(o))
-/*[clinic]
+/*[clinic input]
module _weakref
-[clinic]*/
-/*[clinic checksum: da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
+[clinic start generated code]*/
+/*[clinic end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
-/*[clinic]
+/*[clinic input]
_weakref.getweakrefcount -> Py_ssize_t
@@ -17,7 +17,7 @@ _weakref.getweakrefcount -> Py_ssize_t
/
Return the number of weak references to 'object'.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(_weakref_getweakrefcount__doc__,
"getweakrefcount(object)\n"
@@ -45,13 +45,13 @@ exit:
static Py_ssize_t
_weakref_getweakrefcount_impl(PyModuleDef *module, PyObject *object)
-/*[clinic checksum: 436e8fbe0297434375f039d8c2d9fc3a9bbe773c]*/
+/*[clinic end generated code: checksum=436e8fbe0297434375f039d8c2d9fc3a9bbe773c]*/
{
PyWeakReference **list;
if (!PyType_SUPPORTS_WEAKREFS(Py_TYPE(object)))
return 0;
-
+
list = GET_WEAKREFS_LISTPTR(object);
return _PyWeakref_GetWeakrefCount(*list);
}
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 1258670..3a66316 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -181,10 +181,10 @@ corresponding Unix manual entries for more information on calls.");
#endif /* ! __WATCOMC__ || __QNX__ */
-/*[clinic]
+/*[clinic input]
module os
-[clinic]*/
-/*[clinic checksum: da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
+[clinic start generated code]*/
+/*[clinic end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
#ifndef _MSC_VER
@@ -2355,7 +2355,7 @@ posix_do_stat(char *function_name, path_t *path,
#endif
-/*[python]
+/*[python input]
class path_t_converter(CConverter):
@@ -2396,10 +2396,10 @@ class dir_fd_converter(CConverter):
self.c_default = 'DEFAULT_DIR_FD'
-[python]*/
-/*[python checksum: da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
+[python start generated code]*/
+/*[python end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
-/*[clinic]
+/*[clinic input]
os.stat -> object(doc_default='stat_result')
@@ -2427,7 +2427,7 @@ dir_fd and follow_symlinks may not be implemented
It's an error to use dir_fd or follow_symlinks when specifying path as
an open file descriptor.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(os_stat__doc__,
"stat(path, *, dir_fd=None, follow_symlinks=True)\n"
@@ -2481,7 +2481,7 @@ exit:
static PyObject *
os_stat_impl(PyModuleDef *module, path_t *path, int dir_fd, int follow_symlinks)
-/*[clinic checksum: 85a71ad602e89f8e280118da976f70cd2f9abdf1]*/
+/*[clinic end generated code: checksum=85a71ad602e89f8e280118da976f70cd2f9abdf1]*/
{
return posix_do_stat("stat", path, dir_fd, follow_symlinks);
}
@@ -2522,7 +2522,7 @@ posix_lstat(PyObject *self, PyObject *args, PyObject *kwargs)
#else
#define OS_ACCESS_DIR_FD_CONVERTER dir_fd_unavailable
#endif
-/*[clinic]
+/*[clinic input]
os.access -> object(doc_default='True if granted, False otherwise')
path: path_t(allow_fd=True)
@@ -2559,7 +2559,7 @@ Note that most operations will use the effective uid/gid, therefore this
routine can be used in a suid/sgid environment to test if the invoking user
has the specified access to the path.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(os_access__doc__,
"access(path, mode, *, dir_fd=None, effective_ids=False, follow_symlinks=True)\n"
@@ -2622,7 +2622,7 @@ exit:
static PyObject *
os_access_impl(PyModuleDef *module, path_t *path, int mode, int dir_fd, int effective_ids, int follow_symlinks)
-/*[clinic checksum: 636e835c36562a2fc11acab75314634127fdf769]*/
+/*[clinic end generated code: checksum=636e835c36562a2fc11acab75314634127fdf769]*/
{
PyObject *return_value = NULL;
@@ -2706,7 +2706,7 @@ exit:
#ifdef HAVE_TTYNAME
-/*[clinic]
+/*[clinic input]
os.ttyname -> DecodeFSDefault
fd: int
@@ -2715,7 +2715,7 @@ os.ttyname -> DecodeFSDefault
/
Return the name of the terminal device connected to 'fd'.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(os_ttyname__doc__,
"ttyname(fd)\n"
@@ -2752,7 +2752,7 @@ exit:
static char *
os_ttyname_impl(PyModuleDef *module, int fd)
-/*[clinic checksum: 0f368134dc0a7f21f25185e2e6bacf7675fb473a]*/
+/*[clinic end generated code: checksum=0f368134dc0a7f21f25185e2e6bacf7675fb473a]*/
{
char *ret;
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c
index 0261d71..d12e438 100644
--- a/Modules/unicodedata.c
+++ b/Modules/unicodedata.c
@@ -17,11 +17,11 @@
#include "ucnhash.h"
#include "structmember.h"
-/*[clinic]
+/*[clinic input]
module unicodedata
class unicodedata.UCD
-[clinic]*/
-/*[clinic checksum: da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
+[clinic start generated code]*/
+/*[clinic end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
/* character properties */
@@ -113,7 +113,7 @@ static Py_UCS4 getuchar(PyUnicodeObject *obj)
/* --- Module API --------------------------------------------------------- */
-/*[clinic]
+/*[clinic input]
unicodedata.UCD.decimal
@@ -126,7 +126,7 @@ Converts a Unicode character into its equivalent decimal value.
Returns the decimal value assigned to the Unicode character unichr
as integer. If no such value is defined, default is returned, or, if
not given, ValueError is raised.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(unicodedata_UCD_decimal__doc__,
"decimal(unichr, default=None)\n"
@@ -161,7 +161,7 @@ exit:
static PyObject *
unicodedata_UCD_decimal_impl(PyObject *self, PyUnicodeObject *unichr, PyObject *default_value)
-/*[clinic checksum: 73edde0e9cd5913ea174c4fa81504369761b7426]*/
+/*[clinic end generated code: checksum=73edde0e9cd5913ea174c4fa81504369761b7426]*/
{
PyUnicodeObject *v = (PyUnicodeObject *)unichr;
int have_old = 0;
diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c
index 7f44c4a..5139888 100644
--- a/Modules/zlibmodule.c
+++ b/Modules/zlibmodule.c
@@ -81,12 +81,12 @@ zlib_error(z_stream zst, int err, char *msg)
PyErr_Format(ZlibError, "Error %d %s: %.200s", err, msg, zmsg);
}
-/*[clinic]
+/*[clinic input]
module zlib
class zlib.Compress
class zlib.Decompress
-[clinic]*/
-/*[clinic checksum: da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
+[clinic start generated code]*/
+/*[clinic end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
PyDoc_STRVAR(compressobj__doc__,
"compressobj(level=-1, method=DEFLATED, wbits=15, memlevel=8,\n"
@@ -164,7 +164,7 @@ PyZlib_Free(voidpf ctx, void *ptr)
PyMem_RawFree(ptr);
}
-/*[clinic]
+/*[clinic input]
zlib.compress
bytes: Py_buffer
@@ -177,7 +177,7 @@ zlib.compress
Returns compressed string.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(zlib_compress__doc__,
"compress(bytes, [level])\n"
@@ -227,7 +227,7 @@ zlib_compress(PyModuleDef *module, PyObject *args)
static PyObject *
zlib_compress_impl(PyModuleDef *module, Py_buffer *bytes, int group_right_1, int level)
-/*[clinic checksum: 9f055a396620bc1a8a13d74c3496249528b32b0d]*/
+/*[clinic end generated code: checksum=9f055a396620bc1a8a13d74c3496249528b32b0d]*/
{
PyObject *ReturnVal = NULL;
Byte *input, *output = NULL;
@@ -306,14 +306,14 @@ zlib_compress_impl(PyModuleDef *module, Py_buffer *bytes, int group_right_1, int
return ReturnVal;
}
-/*[python]
+/*[python input]
class uint_converter(CConverter):
type = 'unsigned int'
converter = 'uint_converter'
-[python]*/
-/*[python checksum: da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
+[python start generated code]*/
+/*[python end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
static int
uint_converter(PyObject *obj, void *ptr)
@@ -743,7 +743,7 @@ save_unconsumed_input(compobject *self, int err)
return 0;
}
-/*[clinic]
+/*[clinic input]
zlib.Decompress.decompress
@@ -762,7 +762,7 @@ Return a string containing the decompressed version of the data.
After calling this function, some of the input data may still be stored in
internal buffers for later processing.
Call the flush() method to clear these buffers.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(zlib_Decompress_decompress__doc__,
"decompress(data, max_length=0)\n"
@@ -808,7 +808,7 @@ exit:
static PyObject *
zlib_Decompress_decompress_impl(compobject *self, Py_buffer *data, unsigned int max_length)
-/*[clinic checksum: 5b1e4f9f1ef8eca55fff78356f9df0c81232ed3b]*/
+/*[clinic end generated code: checksum=5b1e4f9f1ef8eca55fff78356f9df0c81232ed3b]*/
{
int err;
unsigned int old_length, length = DEFAULTALLOC;
@@ -1026,13 +1026,13 @@ PyZlib_flush(compobject *self, PyObject *args)
#ifdef HAVE_ZLIB_COPY
-/*[clinic]
+/*[clinic input]
zlib.Compress.copy
self: self(type="compobject *")
Return a copy of the compression object.
-[clinic]*/
+[clinic start generated code]*/
PyDoc_STRVAR(zlib_Compress_copy__doc__,
"copy()\n"
@@ -1056,7 +1056,7 @@ zlib_Compress_copy(PyObject *self, PyObject *Py_UNUSED(ignored))
static PyObject *
zlib_Compress_copy_impl(compobject *self)
-/*[clinic checksum: 2f454ee15be3bc53cfb4e845c3f891f68be4c8e4]*/
+/*[clinic end generated code: checksum=2f454ee15be3bc53cfb4e845c3f891f68be4c8e4]*/
{
compobject *retval = NULL;
int err;