diff options
author | Tom Tromey <tromey@adacore.com> | 2024-02-23 13:10:28 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-02-27 10:30:29 -0700 |
commit | 1eae7be116ddabb13b34d2c2e8e0dc13fbae2a0d (patch) | |
tree | dc0770a269e741138de98fda6ea6cb4c8c179ce1 /gdb/python | |
parent | cfe51255b892962c25166cc0afd8911caf9e1e56 (diff) | |
download | binutils-1eae7be116ddabb13b34d2c2e8e0dc13fbae2a0d.zip binutils-1eae7be116ddabb13b34d2c2e8e0dc13fbae2a0d.tar.gz binutils-1eae7be116ddabb13b34d2c2e8e0dc13fbae2a0d.tar.bz2 |
Rewrite final cleanups
This patch rewrites final cleanups to use std::function and otherwise
be more C++-ish.
Diffstat (limited to 'gdb/python')
-rw-r--r-- | gdb/python/python.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c index 8aa674c..8f8ee7c 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -2057,7 +2057,7 @@ static struct cmd_list_element *user_show_python_list; interpreter. This lets Python's 'atexit' work. */ static void -finalize_python (void *ignore) +finalize_python () { struct active_ext_lang_state *previous_active; @@ -2297,7 +2297,7 @@ init_done: /* Release the GIL while gdb runs. */ PyEval_SaveThread (); - make_final_cleanup (finalize_python, NULL); + add_final_cleanup (finalize_python); /* Only set this when initialization has succeeded. */ gdb_python_initialized = 1; |