mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
Add a C API for sets and frozensets.
This commit is contained in:
parent
e2eca0b709
commit
beb3101b05
5 changed files with 210 additions and 12 deletions
|
@ -773,11 +773,9 @@ r_object(RFILE *p)
|
|||
if (v == NULL)
|
||||
return v;
|
||||
if (type == TYPE_SET)
|
||||
v3 = PyObject_CallFunctionObjArgs(
|
||||
(PyObject *)&PySet_Type, v, NULL);
|
||||
v3 = PySet_New(v);
|
||||
else
|
||||
v3 = PyObject_CallFunctionObjArgs(
|
||||
(PyObject *)&PyFrozenSet_Type, v, NULL);
|
||||
v3 = PyFrozenSet_New(v);
|
||||
Py_DECREF(v);
|
||||
return v3;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue