Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 1 | #ifndef Py_DICTOBJECT_H |
| 2 | #define Py_DICTOBJECT_H |
| 3 | #ifdef __cplusplus |
| 4 | extern "C" { |
| 5 | #endif |
| 6 | |
Guido van Rossum | f70e43a | 1991-02-19 12:39:46 +0000 | [diff] [blame] | 7 | /*********************************************************** |
Guido van Rossum | fd71b9e | 2000-06-30 23:50:40 +0000 | [diff] [blame] | 8 | Copyright (c) 2000, BeOpen.com. |
| 9 | Copyright (c) 1995-2000, Corporation for National Research Initiatives. |
| 10 | Copyright (c) 1990-1995, Stichting Mathematisch Centrum. |
| 11 | All rights reserved. |
Guido van Rossum | f70e43a | 1991-02-19 12:39:46 +0000 | [diff] [blame] | 12 | |
Guido van Rossum | fd71b9e | 2000-06-30 23:50:40 +0000 | [diff] [blame] | 13 | See the file "Misc/COPYRIGHT" for information on usage and |
| 14 | redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
Guido van Rossum | f70e43a | 1991-02-19 12:39:46 +0000 | [diff] [blame] | 15 | ******************************************************************/ |
| 16 | |
Guido van Rossum | 2ec9031 | 1997-05-13 21:23:32 +0000 | [diff] [blame] | 17 | /* Dictionary object type -- mapping from hashable object to object */ |
Guido van Rossum | 85a5fbb | 1990-10-14 12:07:46 +0000 | [diff] [blame] | 18 | |
Guido van Rossum | 2ec9031 | 1997-05-13 21:23:32 +0000 | [diff] [blame] | 19 | extern DL_IMPORT(PyTypeObject) PyDict_Type; |
| 20 | |
| 21 | #define PyDict_Check(op) ((op)->ob_type == &PyDict_Type) |
| 22 | |
Tim Peters | 1f5871e | 2000-07-04 17:44:48 +0000 | [diff] [blame^] | 23 | extern DL_IMPORT(PyObject *) PyDict_New(void); |
| 24 | extern DL_IMPORT(PyObject *) PyDict_GetItem(PyObject *mp, PyObject *key); |
| 25 | extern DL_IMPORT(int) PyDict_SetItem(PyObject *mp, PyObject *key, PyObject *item); |
| 26 | extern DL_IMPORT(int) PyDict_DelItem(PyObject *mp, PyObject *key); |
| 27 | extern DL_IMPORT(void) PyDict_Clear(PyObject *mp); |
Guido van Rossum | 43466ec | 1998-12-04 18:48:25 +0000 | [diff] [blame] | 28 | extern DL_IMPORT(int) PyDict_Next |
Tim Peters | 1f5871e | 2000-07-04 17:44:48 +0000 | [diff] [blame^] | 29 | (PyObject *mp, int *pos, PyObject **key, PyObject **value); |
| 30 | extern DL_IMPORT(PyObject *) PyDict_Keys(PyObject *mp); |
| 31 | extern DL_IMPORT(PyObject *) PyDict_Values(PyObject *mp); |
| 32 | extern DL_IMPORT(PyObject *) PyDict_Items(PyObject *mp); |
| 33 | extern DL_IMPORT(int) PyDict_Size(PyObject *mp); |
| 34 | extern DL_IMPORT(PyObject *) PyDict_Copy(PyObject *mp); |
Jeremy Hylton | a12c7a7 | 2000-03-30 22:27:31 +0000 | [diff] [blame] | 35 | |
Guido van Rossum | 2ec9031 | 1997-05-13 21:23:32 +0000 | [diff] [blame] | 36 | |
Tim Peters | 1f5871e | 2000-07-04 17:44:48 +0000 | [diff] [blame^] | 37 | extern DL_IMPORT(PyObject *) PyDict_GetItemString(PyObject *dp, char *key); |
| 38 | extern DL_IMPORT(int) PyDict_SetItemString(PyObject *dp, char *key, PyObject *item); |
| 39 | extern DL_IMPORT(int) PyDict_DelItemString(PyObject *dp, char *key); |
Guido van Rossum | 85a5fbb | 1990-10-14 12:07:46 +0000 | [diff] [blame] | 40 | |
Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 41 | #ifdef __cplusplus |
| 42 | } |
| 43 | #endif |
| 44 | #endif /* !Py_DICTOBJECT_H */ |