Skip to content

Commit

Permalink
Fix Python setTable() function
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKepzie committed Jul 21, 2017
1 parent 49052ae commit fae0b52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Engine/typesystem_engine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,7 @@


PyObject* subList = PyList_GET_ITEM(%PYARG_1,i);
if (!subList) {
if (!subList || !PyList_Check(subList)) {
PyErr_SetString(PyExc_TypeError, "table must be a list of list objects.");
return 0;
}
Expand All @@ -1506,7 +1506,7 @@

for (int j = 0; j < subSize; ++j) {
PyObject* pyString = PyList_GET_ITEM(subList,j);
if ( PyUnicode_Check(pyString) ) {
if ( PyString_Check(pyString) || PyUnicode_Check(pyString) ) {

PyObject* utf8pyobj = PyUnicode_AsUTF8String(pyString); // newRef
if (utf8pyobj) {
Expand Down

0 comments on commit fae0b52

Please sign in to comment.