objfile_object *obj = (objfile_object *) self;
if (obj->objfile)
- return PyString_Decode (objfile_name (obj->objfile),
- strlen (objfile_name (obj->objfile)),
- host_charset (), NULL);
+ return host_string_to_python_string (objfile_name (obj->objfile));
Py_RETURN_NONE;
}
{
const char *username = obj->objfile->original_name;
- return PyString_Decode (username, strlen (username),
- host_charset (), NULL);
+ return host_string_to_python_string (username);
}
Py_RETURN_NONE;
char *hex_form = make_hex_string (build_id->data, build_id->size);
PyObject *result;
- result = PyString_Decode (hex_form, strlen (hex_form),
- host_charset (), NULL);
+ result = host_string_to_python_string (hex_form);
xfree (hex_form);
return result;
}
objfpy_initialize (objfile_object *self)
{
self->objfile = NULL;
- self->dict = NULL;
+
+ self->dict = PyDict_New ();
+ if (self->dict == NULL)
+ return 0;
self->printers = PyList_New (0);
if (self->printers == NULL)
static char *keywords[] = { "file_name", NULL };
objfile_object *obj = (objfile_object *) self;
const char *file_name;
- int symfile_flags = 0;
OBJFPY_REQUIRE_VALID (obj);
{
bfd *abfd = symfile_bfd_open (file_name);
- symbol_file_add_separate (abfd, file_name, symfile_flags, obj->objfile);
+ symbol_file_add_separate (abfd, file_name, 0, obj->objfile);
}
CATCH (except, RETURN_MASK_ALL)
{