diff options
| author | Christian Heimes <christian@cheimes.de> | 2007-11-29 22:35:39 (GMT) |
|---|---|---|
| committer | Christian Heimes <christian@cheimes.de> | 2007-11-29 22:35:39 (GMT) |
| commit | a22e8bdfd92cd4f1bc3d60e91df6410c4efde6a0 (patch) | |
| tree | 8f865b488f65ff8bab485bafe1cdd8516a65c679 /Objects/dictobject.c | |
| parent | 513b2ac76c1f56f5a6e0d07fee57d823819ee873 (diff) | |
| download | cpython-a22e8bdfd92cd4f1bc3d60e91df6410c4efde6a0.zip cpython-a22e8bdfd92cd4f1bc3d60e91df6410c4efde6a0.tar.gz cpython-a22e8bdfd92cd4f1bc3d60e91df6410c4efde6a0.tar.bz2 | |
Added all PyTypeObjects to the appropriate header files.
Before the patch a lot of internal types weren't available in the header files. The patch exposes the new iterators, views and some other types to all C modules. I've also renamed some of the types and tp_names.
Diffstat (limited to 'Objects/dictobject.c')
| -rw-r--r-- | Objects/dictobject.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index d1ebf1f..dad9855 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -1798,13 +1798,8 @@ dict_tp_clear(PyObject *op) return 0; } - -extern PyTypeObject PyDictIterKey_Type; /* Forward */ -extern PyTypeObject PyDictIterValue_Type; /* Forward */ -extern PyTypeObject PyDictIterItem_Type; /* Forward */ static PyObject *dictiter_new(PyDictObject *, PyTypeObject *); - PyDoc_STRVAR(contains__doc__, "D.__contains__(k) -> True if D has a key k, else False"); @@ -2401,19 +2396,6 @@ dictview_new(PyObject *dict, PyTypeObject *type) - if public then they should probably be in builtins */ -/* Forward */ -PyTypeObject PyDictKeys_Type; -PyTypeObject PyDictItems_Type; -PyTypeObject PyDictValues_Type; - -#define PyDictKeys_Check(obj) ((obj)->ob_type == &PyDictKeys_Type) -#define PyDictItems_Check(obj) ((obj)->ob_type == &PyDictItems_Type) -#define PyDictValues_Check(obj) ((obj)->ob_type == &PyDictValues_Type) - -/* This excludes Values, since they are not sets. */ -# define PyDictViewSet_Check(obj) \ - (PyDictKeys_Check(obj) || PyDictItems_Check(obj)) - /* Return 1 if self is a subset of other, iterating over self; 0 if not; -1 if an error occurred. */ static int |
