summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/_randommodule.c.h
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na92@gmail.com>2020-06-21 09:44:58 (GMT)
committerGitHub <noreply@github.com>2020-06-21 09:44:58 (GMT)
commit6989af0bc7ea1e9a1acea16794e6f723d7b44110 (patch)
tree7a6a51cf05c62572ace0e1420cfa4a0317752931 /Modules/clinic/_randommodule.c.h
parentf9bab74d5b34c64cf061e1629ff5f3092a4ca9b3 (diff)
downloadcpython-6989af0bc7ea1e9a1acea16794e6f723d7b44110.zip
cpython-6989af0bc7ea1e9a1acea16794e6f723d7b44110.tar.gz
cpython-6989af0bc7ea1e9a1acea16794e6f723d7b44110.tar.bz2
bpo-41052: Opt out serialization/deserialization for _random.Random (GH-21002)
Diffstat (limited to 'Modules/clinic/_randommodule.c.h')
-rw-r--r--Modules/clinic/_randommodule.c.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/Modules/clinic/_randommodule.c.h b/Modules/clinic/_randommodule.c.h
index b3cd435..3322a37 100644
--- a/Modules/clinic/_randommodule.c.h
+++ b/Modules/clinic/_randommodule.c.h
@@ -109,4 +109,21 @@ _random_Random_getrandbits(RandomObject *self, PyObject *arg)
exit:
return return_value;
}
-/*[clinic end generated code: output=cc8a23b2757dc6ba input=a9049054013a1b77]*/
+
+PyDoc_STRVAR(_random_Random___reduce____doc__,
+"__reduce__($self, /)\n"
+"--\n"
+"\n");
+
+#define _RANDOM_RANDOM___REDUCE___METHODDEF \
+ {"__reduce__", (PyCFunction)_random_Random___reduce__, METH_NOARGS, _random_Random___reduce____doc__},
+
+static PyObject *
+_random_Random___reduce___impl(RandomObject *self);
+
+static PyObject *
+_random_Random___reduce__(RandomObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _random_Random___reduce___impl(self);
+}
+/*[clinic end generated code: output=450f0961c2c92389 input=a9049054013a1b77]*/