mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	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.
		
			
				
	
	
		
			25 lines
		
	
	
	
		
			397 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			25 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;
 | 
						|
}
 |