public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Use bool for evregpy_no_listeners_p
Date: Fri,  3 Jun 2022 16:36:12 +0000 (GMT)	[thread overview]
Message-ID: <20220603163612.7DCC4384144A@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f5a0f5b503c43ed3e146bc0d3eca37784892b47e

commit f5a0f5b503c43ed3e146bc0d3eca37784892b47e
Author: Tom Tromey <tromey@adacore.com>
Date:   Fri Jun 3 10:35:30 2022 -0600

    Use bool for evregpy_no_listeners_p
    
    I noticed that evregpy_no_listeners_p should return a bool.  This
    patch makes this change.  I'm checking it in.

Diff:
---
 gdb/python/py-events.h      | 2 +-
 gdb/python/py-evtregistry.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/python/py-events.h b/gdb/python/py-events.h
index bd4a75c2aee..1680b582354 100644
--- a/gdb/python/py-events.h
+++ b/gdb/python/py-events.h
@@ -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 */
diff --git a/gdb/python/py-evtregistry.c b/gdb/python/py-evtregistry.c
index 003fe44080d..ef96c483f47 100644
--- a/gdb/python/py-evtregistry.c
+++ b/gdb/python/py-evtregistry.c
@@ -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;


                 reply	other threads:[~2022-06-03 16:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220603163612.7DCC4384144A@sourceware.org \
    --to=tromey@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).