mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +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
|
@ -200,7 +200,7 @@ copy() -- return a copy of the current md5 object\n\
|
|||
";
|
||||
|
||||
statichere PyTypeObject MD5type = {
|
||||
PyObject_HEAD_INIT(&PyType_Type)
|
||||
PyObject_HEAD_INIT(NULL)
|
||||
0, /*ob_size*/
|
||||
"md5", /*tp_name*/
|
||||
sizeof(md5object), /*tp_size*/
|
||||
|
@ -271,6 +271,8 @@ DL_EXPORT(void)
|
|||
initmd5()
|
||||
{
|
||||
PyObject *m, *d;
|
||||
|
||||
MD5type.ob_type = &PyType_Type;
|
||||
m = Py_InitModule3("md5", md5_functions, module_doc);
|
||||
d = PyModule_GetDict(m);
|
||||
PyDict_SetItemString(d, "MD5Type", (PyObject *)&MD5type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue