aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-value.c
diff options
context:
space:
mode:
authorPhil Muldoon <pmuldoon@redhat.com>2010-04-14 13:18:55 +0000
committerPhil Muldoon <pmuldoon@redhat.com>2010-04-14 13:18:55 +0000
commit044c0f87fe79cbb4061927b594490235c5b0a948 (patch)
treef7d985939b141ab42cb0936c21bf2def6b6d7ac3 /gdb/python/py-value.c
parent79f283fe85c2bc28eb97695c591e3c95423a32c8 (diff)
downloadgdb-044c0f87fe79cbb4061927b594490235c5b0a948.zip
gdb-044c0f87fe79cbb4061927b594490235c5b0a948.tar.gz
gdb-044c0f87fe79cbb4061927b594490235c5b0a948.tar.bz2
2010-04-14 Phil Muldoon <pmuldoon@redhat.com>
* python/py-block.c (gdbpy_block_for_pc): Use i8n to encompass error/warning messages. Capitalize and use complete sentences. (blpy_block_syms_iternext): Likewise. * python/py-cmd.c (parse_command_name, cmdpy_init): Likewise. * python/py-frame.c (FRAPY_REQUIRE_VALID, frapy_block) (frame_info_to_frame_object, frapy_read_var) (gdbpy_frame_stop_reason_string): Likewise. * python/py-lazy-string.c (stpy_convert_to_value) (gdbpy_create_lazy_string_object): Likewise. * python/py-objfile.c (objfpy_set_printers): Likewise. * python/py-prettyprint.c (gdbpy_default_visualizer): Likewise. * python/python.c (parameter_to_python): Likewise. * python/py-type.c (typy_range, typy_target): Likewise. * python/py-value.c (valpy_cast, valpy_length, valpy_getitem) (valpy_richcompare, valpy_int, valpy_long, valpy_float): Likewise.
Diffstat (limited to 'gdb/python/py-value.c')
-rw-r--r--gdb/python/py-value.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index a792819..7672b5d 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -304,7 +304,8 @@ valpy_cast (PyObject *self, PyObject *args)
type = type_object_to_type (type_obj);
if (! type)
{
- PyErr_SetString (PyExc_RuntimeError, "argument must be a Type");
+ PyErr_SetString (PyExc_RuntimeError,
+ _("Argument must be a type."));
return NULL;
}
@@ -322,7 +323,7 @@ valpy_length (PyObject *self)
{
/* We don't support getting the number of elements in a struct / class. */
PyErr_SetString (PyExc_NotImplementedError,
- "Invalid operation on gdb.Value.");
+ _("Invalid operation on gdb.Value."));
return -1;
}
@@ -364,7 +365,7 @@ valpy_getitem (PyObject *self, PyObject *key)
type = check_typedef (value_type (tmp));
if (TYPE_CODE (type) != TYPE_CODE_ARRAY
&& TYPE_CODE (type) != TYPE_CODE_PTR)
- error( _("Cannot subscript requested type"));
+ error( _("Cannot subscript requested type."));
else
res_val = value_subscript (tmp, value_as_long (idx));
}
@@ -728,7 +729,7 @@ valpy_richcompare (PyObject *self, PyObject *other, int op)
default:
/* Can't happen. */
PyErr_SetString (PyExc_NotImplementedError,
- "Invalid operation on gdb.Value.");
+ _("Invalid operation on gdb.Value."));
return NULL;
}
@@ -765,7 +766,7 @@ valpy_richcompare (PyObject *self, PyObject *other, int op)
default:
/* Can't happen. */
PyErr_SetString (PyExc_NotImplementedError,
- "Invalid operation on gdb.Value.");
+ _("Invalid operation on gdb.Value."));
result = -1;
break;
}
@@ -806,7 +807,8 @@ valpy_int (PyObject *self)
CHECK_TYPEDEF (type);
if (!is_intlike (type, 0))
{
- PyErr_SetString (PyExc_RuntimeError, "cannot convert value to int");
+ PyErr_SetString (PyExc_RuntimeError,
+ _("Cannot convert value to int."));
return NULL;
}
@@ -837,7 +839,8 @@ valpy_long (PyObject *self)
if (!is_intlike (type, 1))
{
- PyErr_SetString (PyExc_RuntimeError, "cannot convert value to long");
+ PyErr_SetString (PyExc_RuntimeError,
+ _("Cannot convert value to long."));
return NULL;
}
@@ -866,7 +869,8 @@ valpy_float (PyObject *self)
CHECK_TYPEDEF (type);
if (TYPE_CODE (type) != TYPE_CODE_FLT)
{
- PyErr_SetString (PyExc_RuntimeError, "cannot convert value to float");
+ PyErr_SetString (PyExc_RuntimeError,
+ _("Cannot convert value to float."));
return NULL;
}
@@ -977,7 +981,7 @@ convert_value_from_python (PyObject *obj)
value = value_copy (((value_object *) result)->value);
}
else
- PyErr_Format (PyExc_TypeError, _("Could not convert Python object: %s"),
+ PyErr_Format (PyExc_TypeError, _("Could not convert Python object: %s."),
PyString_AsString (PyObject_Str (obj)));
}
if (except.reason < 0)