This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 3/7] py-symbol: use Py_RETURN_NONE instead of open coding it
- From: jeffm at suse dot com
- To: gdb-patches at sourceware dot org
- Cc: Jeff Mahoney <jeffm at suse dot com>
- Date: Thu, 4 Feb 2016 12:29:29 -0500
- Subject: [PATCH 3/7] py-symbol: use Py_RETURN_NONE instead of open coding it
- Authentication-results: sourceware.org; auth=none
- References: <1454606973-31017-1-git-send-email-jeffm at suse dot com>
From: Jeff Mahoney <jeffm@suse.com>
---
gdb/python/py-symbol.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c
index c1511b5..cbbc9e2 100644
--- a/gdb/python/py-symbol.c
+++ b/gdb/python/py-symbol.c
@@ -73,8 +73,7 @@ sympy_get_type (PyObject *self, void *closure)
if (SYMBOL_TYPE (symbol) == NULL)
{
- Py_INCREF (Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
return type_to_type_object (SYMBOL_TYPE (symbol));
@@ -471,8 +470,7 @@ gdbpy_lookup_global_symbol (PyObject *self, PyObject *args, PyObject *kw)
}
else
{
- sym_obj = Py_None;
- Py_INCREF (Py_None);
+ Py_RETURN_NONE;
}
return sym_obj;
--
2.1.4