[Python-checkins] CVS: python/dist/src/Objects sliceobject.c,2.9,2.10
Guido van Rossum
gvanrossum@users.sourceforge.net
2001年10月29日 18:40:54 -0800
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv7189
Modified Files:
sliceobject.c
Log Message:
Add values to tp_getattro and tp_flags so that dir(Ellipsis) will
return the same as dir(None).
Index: sliceobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/sliceobject.c,v
retrieving revision 2.9
retrieving revision 2.10
diff -C2 -d -r2.9 -r2.10
*** sliceobject.c 2001年09月20日 20:46:19 2.9
--- sliceobject.c 2001年10月30日 02:40:52 2.10
***************
*** 25,42 ****
static PyTypeObject PyEllipsis_Type = {
PyObject_HEAD_INIT(&PyType_Type)
! 0,
! "ellipsis",
! 0,
! 0,
! 0, /*tp_dealloc*/ /*never called*/
! 0, /*tp_print*/
! 0, /*tp_getattr*/
! 0, /*tp_setattr*/
! 0, /*tp_compare*/
! (reprfunc)ellipsis_repr, /*tp_repr*/
! 0, /*tp_as_number*/
! 0, /*tp_as_sequence*/
! 0, /*tp_as_mapping*/
! 0, /*tp_hash */
};
--- 25,48 ----
static PyTypeObject PyEllipsis_Type = {
PyObject_HEAD_INIT(&PyType_Type)
! 0, /* ob_size */
! "ellipsis", /* tp_name */
! 0, /* tp_basicsize */
! 0, /* tp_itemsize */
! 0, /*never called*/ /* tp_dealloc */
! 0, /* tp_print */
! 0, /* tp_getattr */
! 0, /* tp_setattr */
! 0, /* tp_compare */
! (reprfunc)ellipsis_repr, /* tp_repr */
! 0, /* tp_as_number */
! 0, /* tp_as_sequence */
! 0, /* tp_as_mapping */
! 0, /* tp_hash */
! 0, /* tp_call */
! 0, /* tp_str */
! PyObject_GenericGetAttr, /* tp_getattro */
! 0, /* tp_setattro */
! 0, /* tp_as_buffer */
! Py_TPFLAGS_DEFAULT, /* tp_flags */
};