mirror of
https://github.com/python/cpython.git
synced 2024-11-21 21:09:37 +01:00
ecb4a2b711
Split list.c and set.c tests of _testcapi into two parts: limited C API tests in _testlimitedcapi and non-limited C API tests in _testcapi.
26 lines
397 B
C
26 lines
397 B
C
#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;
|
|
}
|