Core and Builtins
-----------------
+- Issue #11135: Remove redundant doc field from PyType_Spec.
+
- Issue #11067: Add PyType_GetFlags, to support PyUnicode_Check
in the limited ABI.
}
static PyType_Slot Xxo_Type_slots[] = {
+ {Py_tp_doc, "The Xxo type"},
{Py_tp_dealloc, Xxo_dealloc},
{Py_tp_getattro, Xxo_getattro},
{Py_tp_setattr, Xxo_setattr},
};
static PyType_Spec Xxo_Type_spec = {
- "xxmodule.Xxo",
- NULL,
+ "xxlimited.Xxo",
sizeof(XxoObject),
0,
Py_TPFLAGS_DEFAULT,
"xxlimited.Str",
0,
0,
- 0,
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
Str_Type_slots
};
static PyType_Spec Null_Type_spec = {
"xxlimited.Null",
- NULL, /* doc */
0, /* basicsize */
0, /* itemsize */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
static struct PyModuleDef xxmodule = {
PyModuleDef_HEAD_INIT,
- "xx",
+ "xxlimited",
module_doc,
-1,
xx_methods,
/* Add some symbolic constants to the module */
if (ErrorObject == NULL) {
- ErrorObject = PyErr_NewException("xx.error", NULL, NULL);
+ ErrorObject = PyErr_NewException("xxlimited.error", NULL, NULL);
if (ErrorObject == NULL)
goto fail;
}
res = []
res.append('static PyType_Slot %s_slots[] = {' % name)
# defaults for spec
- spec = { 'tp_doc':'NULL', 'tp_itemsize':'0' }
+ spec = { 'tp_itemsize':'0' }
for i, val in enumerate(fields):
if val.endswith('0'):
continue
res.append('};')
res.append('static PyType_Spec %s_spec = {' % name)
res.append(' %s,' % spec['tp_name'])
- res.append(' %s,' % spec['tp_doc'])
res.append(' %s,' % spec['tp_basicsize'])
res.append(' %s,' % spec['tp_itemsize'])
res.append(' %s,' % spec['tp_flags'])