diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2002-05-02 20:34:12 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2002-05-02 20:34:12 (GMT) |
commit | b9132a2a15431f3ddf20c83e43beb85eb713f63c (patch) | |
tree | 1f9f950f95b9d2ffc3360a01ae6f9ae2b0f8e517 /Modules/arraymodule.c | |
parent | 76da0c3b713e5ec1875bc9adba57a497ef5a746e (diff) | |
download | cpython-b9132a2a15431f3ddf20c83e43beb85eb713f63c.zip cpython-b9132a2a15431f3ddf20c83e43beb85eb713f63c.tar.gz cpython-b9132a2a15431f3ddf20c83e43beb85eb713f63c.tar.bz2 |
Indicate delayed initialization of slots. Suggested by tim.one.
Diffstat (limited to 'Modules/arraymodule.c')
-rw-r--r-- | Modules/arraymodule.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index 0653e89..8d3e026 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -13,6 +13,8 @@ #endif /* DONT_HAVE_SYS_TYPES_H */ #endif /* !STDC_HEADERS */ +#define DELAYED(X) 0 + struct arrayobject; /* Forward */ /* All possible arraydescr values are defined in the vector "descriptors" @@ -1697,7 +1699,7 @@ statichere PyTypeObject Arraytype = { 0, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ - 0, /* tp_getattro */ + DELAYED(PyObject_GenericGetAttr), /* tp_getattro */ 0, /* tp_setattro */ &array_as_buffer, /* tp_as_buffer*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ @@ -1717,9 +1719,9 @@ statichere PyTypeObject Arraytype = { 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ - 0, /* tp_alloc */ + DELAYED(PyType_GenericAlloc), /* tp_alloc */ array_new, /* tp_new */ - 0, /* tp_free */ + DELAYED(PyObject_Del), /* tp_free */ }; /* No functions in array module. */ |