* python/py-type.c (make_fielditem, typy_field_names, typy_items)

(typy_length, typy_get, typy_has_key, typy_make_iter)
(typy_iterkeys, typy_iteritems, typy_itervalues, typy_iter)
(typy_iterator_iter, typy_iterator_iternext)
(typy_iterator_dealloc): New functions to implement standard
Python mapping methods on gdb.Type object.
(gdb.TypeIterator): New Python type.
* python/python-internal.h (gdbpy_iter_kind): New enum.
* doc/gdb.texinfo (gdb.Type): Document field access by dictionary
key syntax.
This commit is contained in:
Paul Koning
2011-09-28 20:04:52 +00:00
parent 514c97d3e0
commit a73bb89264
4 changed files with 425 additions and 25 deletions

View File

@ -104,6 +104,8 @@ typedef unsigned long gdb_py_ulongest;
#include "exceptions.h"
enum gdbpy_iter_kind { iter_keys, iter_values, iter_items };
struct block;
struct value;
struct language_defn;