Skip to content
This repository was archived by the owner on Aug 10, 2022. It is now read-only.

Commit 0b25cc5

Browse files
committed
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
1 parent 8531cec commit 0b25cc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dict.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func PyDict_Size(p *PyObject) int {
123123

124124
//PyDict_Next : https://docs.python.org/3/c-api/dict.html#c.PyDict_Next
125125
func PyDict_Next(p *PyObject, ppos *int, pkey, pvalue **PyObject) bool {
126-
cpos := C.long(*ppos)
126+
cpos := C.Py_ssize_t(*ppos)
127127
ckey := toc(*pkey)
128128
cvalue := toc(*pvalue)
129129

0 commit comments

Comments
 (0)