[Python-checkins] python/dist/src/Modules arraymodule.c,2.70,2.71
loewis@sourceforge.net
loewis@sourceforge.net
Thu, 02 May 2002 13:10:01 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv16518
Modified Files:
arraymodule.c
Log Message:
Patch #551009: Initialize array type dynamically.
Index: arraymodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v
retrieving revision 2.70
retrieving revision 2.71
diff -C2 -d -r2.70 -r2.71
*** arraymodule.c 12 Apr 2002 02:39:57 -0000 2.70
--- arraymodule.c 2 May 2002 20:09:59 -0000 2.71
***************
*** 1698,1702 ****
0, /* tp_call */
0, /* tp_str */
! PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */
&array_as_buffer, /* tp_as_buffer*/
--- 1698,1702 ----
0, /* tp_call */
0, /* tp_str */
! 0, /* tp_getattro */
0, /* tp_setattro */
&array_as_buffer, /* tp_as_buffer*/
***************
*** 1718,1724 ****
0, /* tp_dictoffset */
0, /* tp_init */
! PyType_GenericAlloc, /* tp_alloc */
array_new, /* tp_new */
! PyObject_Del, /* tp_free */
};
--- 1718,1724 ----
0, /* tp_dictoffset */
0, /* tp_init */
! 0, /* tp_alloc */
array_new, /* tp_new */
! 0, /* tp_free */
};
***************
*** 1735,1738 ****
--- 1735,1741 ----
Arraytype.ob_type = &PyType_Type;
+ Arraytype.tp_getattro = PyObject_GenericGetAttr;
+ Arraytype.tp_alloc = PyType_GenericAlloc;
+ Arraytype.tp_free = PyObject_Del;
m = Py_InitModule3("array", a_methods, module_doc);