@@ -2063,6 +2063,40 @@ test_long_stdint(PyObject *Py_UNUSED(module), PyObject *Py_UNUSED(args))
20632063}
20642064
20652065
2066+ static PyObject *
2067+ test_structmember (PyObject * Py_UNUSED (module ), PyObject * Py_UNUSED (args ))
2068+ {
2069+ assert (Py_T_SHORT >= 0 );
2070+ assert (Py_T_INT >= 0 );
2071+ assert (Py_T_LONG >= 0 );
2072+ assert (Py_T_FLOAT >= 0 );
2073+ assert (Py_T_DOUBLE >= 0 );
2074+ assert (Py_T_STRING >= 0 );
2075+ assert (_Py_T_OBJECT >= 0 );
2076+ assert (Py_T_CHAR >= 0 );
2077+ assert (Py_T_BYTE >= 0 );
2078+ assert (Py_T_UBYTE >= 0 );
2079+ assert (Py_T_USHORT >= 0 );
2080+ assert (Py_T_UINT >= 0 );
2081+ assert (Py_T_ULONG >= 0 );
2082+ assert (Py_T_STRING_INPLACE >= 0 );
2083+ assert (Py_T_BOOL >= 0 );
2084+ assert (Py_T_OBJECT_EX >= 0 );
2085+ assert (Py_T_LONGLONG >= 0 );
2086+ assert (Py_T_ULONGLONG >= 0 );
2087+ assert (Py_T_PYSSIZET >= 0 );
2088+ #if PY_VERSION_HEX >= 0x03000000 && !defined(PYPY_VERSION )
2089+ assert (_Py_T_NONE >= 0 );
2090+ #endif
2091+
2092+ assert (Py_READONLY >= 0 );
2093+ assert (Py_AUDIT_READ >= 0 );
2094+ assert (_Py_WRITE_RESTRICTED >= 0 );
2095+
2096+ Py_RETURN_NONE ;
2097+ }
2098+
2099+
20662100static struct PyMethodDef methods [] = {
20672101 {"test_object" , test_object , METH_NOARGS , _Py_NULL },
20682102 {"test_py_is" , test_py_is , METH_NOARGS , _Py_NULL },
@@ -2109,6 +2143,7 @@ static struct PyMethodDef methods[] = {
21092143 {"test_bytes" , test_bytes , METH_NOARGS , _Py_NULL },
21102144 {"test_iter" , test_iter , METH_NOARGS , _Py_NULL },
21112145 {"test_long_stdint" , test_long_stdint , METH_NOARGS , _Py_NULL },
2146+ {"test_structmember" , test_structmember , METH_NOARGS , _Py_NULL },
21122147 {_Py_NULL , _Py_NULL , 0 , _Py_NULL }
21132148};
21142149
0 commit comments