This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Implement set/show callback functions in gdb.Parameter
- From: Tom Tromey <tromey at redhat dot com>
- To: pmuldoon at redhat dot com
- Cc: eliz at gnu dot org, gdb-patches at sourceware dot org
- Date: Mon, 07 Mar 2011 12:28:47 -0700
- Subject: Re: [patch] Implement set/show callback functions in gdb.Parameter
- References: <m3bp2dw9io.fsf@redhat.com> <m3d3mc80js.fsf@fleche.redhat.com> <m34o7ehqht.fsf@redhat.com>
>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:
Phil> Anyway patch attached. What do you think?
Very close now.
Phil> + PyObject *set_doc_func = PyString_FromString ("get_set_string");
Phil> +
Phil> + make_cleanup_py_decref (set_doc_func);
The PyString_FromString call can fail.
So, you need a check here.
Phil> + PyObject *show_doc_func = PyString_FromString ("get_show_string");
Phil> +
Phil> + make_cleanup_py_decref (show_doc_func);
Likewise.
This is ok with those fixed.
Tom