* gdbtypes.c (create_string_type): Receive character type as argument.
[deliverable/binutils-gdb.git] / gdb / python / python-value.c
index 46af318e61008225b15b898a71c206661fb2a3ab..1b34f47c2716a5c5d6fb112ddd95d251a4cfeba1 100644 (file)
@@ -55,6 +55,9 @@ struct value *values_in_python = NULL;
 #define builtin_type_pybool \
   language_bool_type (current_language, current_gdbarch)
 
+#define builtin_type_pychar \
+  language_string_char_type (current_language, current_gdbarch)
+
 typedef struct {
   PyObject_HEAD
   struct value *value;
@@ -867,7 +870,7 @@ convert_value_from_python (PyObject *obj)
          if (s != NULL)
            {
              old = make_cleanup (xfree, s);
-             value = value_from_string (s);
+             value = value_cstring (s, strlen (s), builtin_type_pychar);
              do_cleanups (old);
            }
        }
This page took 0.023812 seconds and 4 git commands to generate.