| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent dafdd7f commit 6916806
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -396,7 +396,6 @@ typedef struct{ | |||
| 396 | 396 | ||
| 397 | 397 | typedef struct{ | |
| 398 | 398 | const char* name; | |
| 399 | - const char* doc; | ||
| 400 | 399 | int basicsize; | |
| 401 | 400 | int itemsize; | |
| 402 | 401 | int flags; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,6 +10,8 @@ What's New in Python 3.2? | |||
| 10 | 10 | Core and Builtins | |
| 11 | 11 | ----------------- | |
| 12 | 12 | ||
| 13 | + - Issue #11135: Remove redundant doc field from PyType_Spec. | ||
| 14 | + | ||
| 13 | 15 | - Issue #11067: Add PyType_GetFlags, to support PyUnicode_Check | |
| 14 | 16 | in the limited ABI. | |
| 15 | 17 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -101,6 +101,7 @@ Xxo_setattr(XxoObject *self, char *name, PyObject *v) | |||
| 101 | 101 | } | |
| 102 | 102 | ||
| 103 | 103 | static PyType_Slot Xxo_Type_slots[] = { | |
| 104 | + {Py_tp_doc, "The Xxo type"}, | ||
| 104 | 105 | {Py_tp_dealloc, Xxo_dealloc}, | |
| 105 | 106 | {Py_tp_getattro, Xxo_getattro}, | |
| 106 | 107 | {Py_tp_setattr, Xxo_setattr}, | |
@@ -109,8 +110,7 @@ static PyType_Slot Xxo_Type_slots[] = { | |||
| 109 | 110 | }; | |
| 110 | 111 | ||
| 111 | 112 | static PyType_Spec Xxo_Type_spec = { | |
| 112 | - "xxmodule.Xxo", | ||
| 113 | - NULL, | ||
| 113 | + "xxlimited.Xxo", | ||
| 114 | 114 | sizeof(XxoObject), | |
| 115 | 115 | 0, | |
| 116 | 116 | Py_TPFLAGS_DEFAULT, | |
@@ -178,7 +178,6 @@ static PyType_Spec Str_Type_spec = { | |||
| 178 | 178 | "xxlimited.Str", | |
| 179 | 179 | 0, | |
| 180 | 180 | 0, | |
| 181 | - 0, | ||
| 182 | 181 | Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, | |
| 183 | 182 | Str_Type_slots | |
| 184 | 183 | }; | |
@@ -201,7 +200,6 @@ static PyType_Slot Null_Type_slots[] = { | |||
| 201 | 200 | ||
| 202 | 201 | static PyType_Spec Null_Type_spec = { | |
| 203 | 202 | "xxlimited.Null", | |
| 204 | - NULL, /* doc */ | ||
| 205 | 203 | 0, /* basicsize */ | |
| 206 | 204 | 0, /* itemsize */ | |
| 207 | 205 | Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, | |
@@ -230,7 +228,7 @@ PyDoc_STRVAR(module_doc, | |||
| 230 | 228 | ||
| 231 | 229 | static struct PyModuleDef xxmodule = { | |
| 232 | 230 | PyModuleDef_HEAD_INIT, | |
| 233 | - "xx", | ||
| 231 | + "xxlimited", | ||
| 234 | 232 | module_doc, | |
| 235 | 233 | -1, | |
| 236 | 234 | xx_methods, | |
@@ -264,7 +262,7 @@ PyInit_xxlimited(void) | |||
| 264 | 262 | ||
| 265 | 263 | /* Add some symbolic constants to the module */ | |
| 266 | 264 | if (ErrorObject == NULL) { | |
| 267 | - ErrorObject = PyErr_NewException("xx.error", NULL, NULL); | ||
| 265 | + ErrorObject = PyErr_NewException("xxlimited.error", NULL, NULL); | ||
| 268 | 266 | if (ErrorObject == NULL) | |
| 269 | 267 | goto fail; | |
| 270 | 268 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -162,7 +162,7 @@ def make_slots(name, fields): | |||
| 162 | 162 | res = [] | |
| 163 | 163 | res.append('static PyType_Slot %s_slots[] = {' % name) | |
| 164 | 164 | # defaults for spec | |
| 165 | - spec = { 'tp_doc':'NULL', 'tp_itemsize':'0' } | ||
| 165 | + spec = { 'tp_itemsize':'0' } | ||
| 166 | 166 | for i, val in enumerate(fields): | |
| 167 | 167 | if val.endswith('0'): | |
| 168 | 168 | continue | |
@@ -174,7 +174,6 @@ def make_slots(name, fields): | |||
| 174 | 174 | res.append('};') | |
| 175 | 175 | res.append('static PyType_Spec %s_spec = {' % name) | |
| 176 | 176 | res.append(' %s,' % spec['tp_name']) | |
| 177 | - res.append(' %s,' % spec['tp_doc']) | ||
| 178 | 177 | res.append(' %s,' % spec['tp_basicsize']) | |
| 179 | 178 | res.append(' %s,' % spec['tp_itemsize']) | |
| 180 | 179 | res.append(' %s,' % spec['tp_flags']) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments