mirror of
https://github.com/python/cpython.git
synced 2025-08-23 18:24:46 +00:00
Patch from Paul Sokolovsky <Paul.Sokolovsky@technologist.com>:
Attached is patch (against 1.5.2 release) to allow some modules to be buildable as pyd's (usual &PyType_Type stuff).
This commit is contained in:
parent
0fdffcf916
commit
0d40ba4cdf
3 changed files with 9 additions and 3 deletions
|
@ -1448,7 +1448,7 @@ itemsize -- the length in bytes of one array item\n\
|
|||
";
|
||||
|
||||
statichere PyTypeObject Arraytype = {
|
||||
PyObject_HEAD_INIT(&PyType_Type)
|
||||
PyObject_HEAD_INIT(NULL)
|
||||
0,
|
||||
"array",
|
||||
sizeof(arrayobject),
|
||||
|
@ -1476,6 +1476,8 @@ DL_EXPORT(void)
|
|||
initarray()
|
||||
{
|
||||
PyObject *m, *d;
|
||||
|
||||
Arraytype.ob_type = &PyType_Type;
|
||||
m = Py_InitModule3("array", a_methods, module_doc);
|
||||
d = PyModule_GetDict(m);
|
||||
PyDict_SetItemString(d, "ArrayType", (PyObject *)&Arraytype);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue