0
0
mirror of https://github.com/python/cpython.git synced 2024-11-21 21:09:37 +01:00
cpython/Modules/_testcapi/set.c

26 lines
397 B
C
Raw Normal View History

#include "parts.h"
#include "util.h"
static PyObject *
set_get_size(PyObject *self, PyObject *obj)
{
NULLABLE(obj);
RETURN_SIZE(PySet_GET_SIZE(obj));
}
static PyMethodDef test_methods[] = {
{"set_get_size", set_get_size, METH_O},
{NULL},
};
int
_PyTestCapi_Init_Set(PyObject *m)
{
if (PyModule_AddFunctions(m, test_methods) < 0) {
return -1;
}
return 0;
}