Skip to content

Commit 85e0712

Browse files
committed
Solve issue in dict debug on windows.
1 parent c1bfe0f commit 85e0712

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/loaders/py_loader/source/py_loader_dict.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ void py_loader_impl_dict_debug(PyObject *py_dict)
164164

165165
if (!PyDict_Check(py_dict))
166166
{
167-
PyErr_SetString(PyExc_TypeError, "Provided object is not a dictionary.");
167+
PyErr_SetString(PyExc_TypeErrorPtr(), "Provided object is not a dictionary.");
168168
return;
169169
}
170170

@@ -174,9 +174,9 @@ void py_loader_impl_dict_debug(PyObject *py_dict)
174174
{
175175
printf("Key: ");
176176
PyObject_Print(key, stdout, 0);
177-
printf("#%ld, Value: ", Py_REFCNT(key));
177+
printf("#%" PY_FORMAT_SIZE_T "d, Value: ", Py_REFCNT(key));
178178
PyObject_Print(value, stdout, 0);
179-
printf(" #%ld\n", Py_REFCNT(value));
179+
printf(" #%" PY_FORMAT_SIZE_T "d\n", Py_REFCNT(value));
180180
fflush(stdout);
181181
}
182182
}

0 commit comments

Comments
 (0)