gdb.python/py-nested-maps.exp C++ify
commita83cdcb636a661fe0070160d58b69a27be9ae079
authorPedro Alves <pedro@palves.net>
Thu, 17 Sep 2020 22:33:42 +0000 (17 23:33 +0100)
committerPedro Alves <pedro@palves.net>
Thu, 17 Sep 2020 23:07:22 +0000 (18 00:07 +0100)
tree2ed94b376e721e836946f828e62372c9d20d58f3
parentd4bcee5cccce0ef4acb6f7cb571f439bba07df7f
gdb.python/py-nested-maps.exp C++ify

This adjusts gdb.python/py-nested-maps.c to make it buildable as C++ program.

key_t is renamed because of:

  src/gdb/testsuite/gdb.python/py-nested-maps.c:23:8: error: definition of type 'key_t' conflicts with typedef of the same name
  struct key_t
 ^
  /usr/include/x86_64-linux-gnu/sys/types.h:121:17: note: 'key_t' declared here
  typedef __key_t key_t;
  ^

gdb/testsuite/ChangeLog:

* gdb.python/py-nested-maps.c (struct key_t): Rename to...
(struct my_key_t): ... this.  Adjust all references.
(struct value_t): Rename to ...
(struct my_value_t): ... this.  Adjust all references.
(create_map, add_map_element, create_map_map)
(add_map_map_element): Add casts.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-nested-maps.c