aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-value.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-02-28 19:38:34 +0000
committerTom Tromey <tromey@redhat.com>2011-02-28 19:38:34 +0000
commitfb6a3ed3936ceb4a40d9a3b8ee53ebc561e50431 (patch)
tree4123479677d9645a667ab778ceb3aa92727ffb95 /gdb/python/py-value.c
parent9bb4c1bb7e2b5808fad979167f84f6dd1db0f000 (diff)
downloadgdb-fb6a3ed3936ceb4a40d9a3b8ee53ebc561e50431.zip
gdb-fb6a3ed3936ceb4a40d9a3b8ee53ebc561e50431.tar.gz
gdb-fb6a3ed3936ceb4a40d9a3b8ee53ebc561e50431.tar.bz2
* python/python.c (gdbpy_value_cst): New global.
(_initialize_python): Initialize it. * python/python-internal.h (gdbpy_value_cst): Declare. * python/py-value.c (convert_value_from_python): Use gdbpy_value_cst.
Diffstat (limited to 'gdb/python/py-value.c')
-rw-r--r--gdb/python/py-value.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index 0eda620..515eaec 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -1162,9 +1162,8 @@ convert_value_from_python (PyObject *obj)
else if (gdbpy_is_lazy_string (obj))
{
PyObject *result;
- PyObject *function = PyString_FromString ("value");
- result = PyObject_CallMethodObjArgs (obj, function, NULL);
+ result = PyObject_CallMethodObjArgs (obj, gdbpy_value_cst, NULL);
value = value_copy (((value_object *) result)->value);
}
else