bugfix for print names in the C runtime and expose the functionality from Java

This commit is contained in:
krasimir
2017-05-11 09:11:30 +00:00
parent 2cf98147e6
commit a839bdc687
5 changed files with 26 additions and 7 deletions

View File

@@ -1303,11 +1303,15 @@ Concr_init(ConcrObject *self, PyObject *args, PyObject *kwds)
static PyObject*
Concr_printName(ConcrObject* self, PyObject *args)
{
GuString name;
if (!PyArg_ParseTuple(args, "s", &name))
GuString id;
if (!PyArg_ParseTuple(args, "s", &id))
return NULL;
return PyString_FromString(pgf_print_name(self->concr, name));
GuString name = pgf_print_name(self->concr, id);
if (name == NULL)
Py_RETURN_NONE;
return PyString_FromString(name);
}
#if ( (PY_VERSION_HEX < 0x02070000) \