struct bpstat;
struct inferior;
-extern int gdb_python_initialized;
+extern bool gdb_python_initialized;
extern PyObject *gdb_module;
extern PyObject *gdb_python_module;
/* True if Python has been successfully initialized, false
otherwise. */
-int gdb_python_initialized;
+bool gdb_python_initialized;
extern PyMethodDef python_GdbMethods[];
PyEval_SaveThread ();
/* Only set this when initialization has succeeded. */
- gdb_python_initialized = 1;
+ gdb_python_initialized = true;
return true;
}
bool saw_exception = false;
{
scoped_restore reset_gdb_python_initialized
- = make_scoped_restore (&gdb_python_initialized, 0);
+ = make_scoped_restore (&gdb_python_initialized, false);
try
{
CMD (output);
static int
gdbpy_initialized (const struct extension_language_defn *extlang)
{
- return gdb_python_initialized;
+ return gdb_python_initialized ? 1 : 0;
}
PyMethodDef python_GdbMethods[] =