diff options
author | Tom Tromey <tromey@redhat.com> | 2012-03-30 20:05:55 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-03-30 20:05:55 +0000 |
commit | 9bc3523d11081b973ad34f212cb5cacf3126a27f (patch) | |
tree | 9635876e96067d128db087aa9d90211a6e5a648e /gdb/python/py-value.c | |
parent | f87a302320198a6e616d5c64b8cb377236ed38df (diff) | |
download | gdb-9bc3523d11081b973ad34f212cb5cacf3126a27f.zip gdb-9bc3523d11081b973ad34f212cb5cacf3126a27f.tar.gz gdb-9bc3523d11081b973ad34f212cb5cacf3126a27f.tar.bz2 |
* python/python.c (gdbpy_decode_line): Move cleanup creation out
of TRY_CATCH. Fix error handling.
* python/py-value.c (convert_value_from_python): Move 'old'
declaration to innermost scope.
Diffstat (limited to 'gdb/python/py-value.c')
-rw-r--r-- | gdb/python/py-value.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c index 58513d8..6f67bdb 100644 --- a/gdb/python/py-value.c +++ b/gdb/python/py-value.c @@ -1250,7 +1250,6 @@ struct value * convert_value_from_python (PyObject *obj) { struct value *value = NULL; /* -Wall */ - struct cleanup *old; volatile struct gdb_exception except; int cmp; @@ -1319,6 +1318,8 @@ convert_value_from_python (PyObject *obj) s = python_string_to_target_string (obj); if (s != NULL) { + struct cleanup *old; + old = make_cleanup (xfree, s); value = value_cstring (s, strlen (s), builtin_type_pychar); do_cleanups (old); |