From db972fce46368f7d2a60e43aca78f0757515c0c8 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 13 Jan 2021 11:57:24 -0500 Subject: gdb: bool-ify ext_lang_auto_load_enabled and friends Make it and related functions return bool. Move function comments to header where applicable. gdb/ChangeLog: * auto-load.h (auto_load_gdb_scripts_enabled): Return bool, move comment here. * auto-load.c (auto_load_gdb_scripts_enabled): Return bool, move comment to header. * extension-priv.h (struct extension_language_script_ops) : Return bool. * extension.h (ext_lang_auto_load_enabled): Return bool, move comment here. * extension.c (ext_lang_auto_load_enabled): Return bool, move comment to header. * guile/guile-header.h (gdbscm_auto_load_enabled): Return bool, move comment here. * guile/scm-auto-load.c (gdbscm_auto_load_enabled): Return bool, move comment to header. * python/python-header.h (gdbpy_auto_load_enabled): Return bool, move comment here. * python/py-auto-load.c (gdbpy_auto_load_enabled): Return bool, move comment to header. Change-Id: I657a17d2dab77a36884a137ce9b23a2cc6d53140 --- gdb/python/py-auto-load.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gdb/python/py-auto-load.c') diff --git a/gdb/python/py-auto-load.c b/gdb/python/py-auto-load.c index 1879346d..3b279312 100644 --- a/gdb/python/py-auto-load.c +++ b/gdb/python/py-auto-load.c @@ -40,10 +40,9 @@ show_auto_load_python_scripts (struct ui_file *file, int from_tty, fprintf_filtered (file, _("Auto-loading of Python scripts is %s.\n"), value); } -/* Return non-zero if auto-loading Python scripts is enabled. - This is the extension_language_script_ops.auto_load_enabled "method". */ +/* See python-internal.h. */ -int +bool gdbpy_auto_load_enabled (const struct extension_language_defn *extlang) { return auto_load_python_scripts; -- cgit v1.1