summaryrefslogtreecommitdiffstats
path: root/Modules/clinic
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na92@gmail.com>2020-06-21 10:33:06 (GMT)
committerGitHub <noreply@github.com>2020-06-21 10:33:06 (GMT)
commit814b07bf814a804f60b897d18f1dbb5578b2c7fd (patch)
treed2c6476db2df0b1614451896fd17703cb76d9b19 /Modules/clinic
parent71bb921829c33c30b2e111e18948df8c2b6731e4 (diff)
downloadcpython-814b07bf814a804f60b897d18f1dbb5578b2c7fd.zip
cpython-814b07bf814a804f60b897d18f1dbb5578b2c7fd.tar.gz
cpython-814b07bf814a804f60b897d18f1dbb5578b2c7fd.tar.bz2
[3.9] bpo-41052: Opt out serialization/deserialization for _random.Random (GH-21002). (GH-21030)
(cherry picked from commit 6989af0bc7ea1e9a1acea16794e6f723d7b44110) Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
Diffstat (limited to 'Modules/clinic')
-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 a467811..0a642df 100644
--- a/Modules/clinic/_randommodule.c.h
+++ b/Modules/clinic/_randommodule.c.h
@@ -114,4 +114,21 @@ _random_Random_getrandbits(RandomObject *self, PyObject *arg)
exit:
return return_value;
}
-/*[clinic end generated code: output=a7feb0c9c8d1b627 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=d8a99be3f1192219 input=a9049054013a1b77]*/