mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-05 23:23:09 +00:00
Use gdb map in py-connection.c
This changes py-connection.c to use gdb::unordered_map. Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
@@ -27,8 +27,7 @@
|
|||||||
#include "arch-utils.h"
|
#include "arch-utils.h"
|
||||||
#include "remote.h"
|
#include "remote.h"
|
||||||
#include "charset.h"
|
#include "charset.h"
|
||||||
|
#include "gdbsupport/unordered_map.h"
|
||||||
#include <map>
|
|
||||||
|
|
||||||
/* The Python object that represents a connection. */
|
/* The Python object that represents a connection. */
|
||||||
|
|
||||||
@@ -65,8 +64,8 @@ extern PyTypeObject remote_connection_object_type
|
|||||||
/* A map between process_stratum targets and the Python object representing
|
/* A map between process_stratum targets and the Python object representing
|
||||||
them. We actually hold a gdbpy_ref around the Python object so that
|
them. We actually hold a gdbpy_ref around the Python object so that
|
||||||
reference counts are handled correctly when entries are deleted. */
|
reference counts are handled correctly when entries are deleted. */
|
||||||
static std::map<process_stratum_target *,
|
static gdb::unordered_map<process_stratum_target *,
|
||||||
gdbpy_ref<connection_object>> all_connection_objects;
|
gdbpy_ref<connection_object>> all_connection_objects;
|
||||||
|
|
||||||
/* Return a reference to a gdb.TargetConnection object for TARGET. If
|
/* Return a reference to a gdb.TargetConnection object for TARGET. If
|
||||||
TARGET is nullptr then a reference to None is returned.
|
TARGET is nullptr then a reference to None is returned.
|
||||||
|
|||||||
Reference in New Issue
Block a user