From 0b25cc550560f4b3e49c89af907f7cfeffe94dac Mon Sep 17 00:00:00 2001 From: Maxime Mouial Date: Wed, 30 Jan 2019 15:27:19 -0700 Subject: [PATCH] Fix position type Py_ssize_t is not the same time on linux and windows (long vs longlong). Using the python size_t type fix the issue --- dict.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dict.go b/dict.go index b0d7072..e22cafa 100644 --- a/dict.go +++ b/dict.go @@ -123,7 +123,7 @@ func PyDict_Size(p *PyObject) int { //PyDict_Next : https://docs.python.org/3/c-api/dict.html#c.PyDict_Next func PyDict_Next(p *PyObject, ppos *int, pkey, pvalue **PyObject) bool { - cpos := C.long(*ppos) + cpos := C.Py_ssize_t(*ppos) ckey := toc(*pkey) cvalue := toc(*pvalue)