Use bool for evregpy_no_listeners_p
authorTom Tromey <tromey@adacore.com>
Fri, 3 Jun 2022 16:35:30 +0000 (10:35 -0600)
committerTom Tromey <tromey@adacore.com>
Fri, 3 Jun 2022 16:35:30 +0000 (10:35 -0600)
I noticed that evregpy_no_listeners_p should return a bool.  This
patch makes this change.  I'm checking it in.

gdb/python/py-events.h
gdb/python/py-evtregistry.c

index bd4a75c2aee5938354882ada93f66f1177869032..1680b582354cbf3cffbd12d2404603adcd1e8893 100644 (file)
@@ -52,6 +52,6 @@ struct events_object
 extern events_object gdb_py_events;
 
 extern eventregistry_object *create_eventregistry_object (void);
-extern int evregpy_no_listeners_p (eventregistry_object *registry);
+extern bool evregpy_no_listeners_p (eventregistry_object *registry);
 
 #endif /* PYTHON_PY_EVENTS_H */
index 003fe44080da63b16142864a6169e16ed4ac5be2..ef96c483f47c27572bcc72ee546b2327aa177720 100644 (file)
@@ -115,7 +115,7 @@ gdbpy_initialize_eventregistry (void)
 /* Return the number of listeners currently connected to this
    registry.  */
 
-int
+bool
 evregpy_no_listeners_p (eventregistry_object *registry)
 {
   return PyList_Size (registry->callbacks) == 0;