We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent feb8731 commit 5fb6831Copy full SHA for 5fb6831
bind/gen_slice.go
@@ -409,7 +409,11 @@ otherwise parameter is a python list that we copy from
409
g.gofile.Printf("s := deptrFromHandle_Slice_byte(handle)\n")
410
g.gofile.Printf("ptr := unsafe.Pointer(&s[0])\n")
411
g.gofile.Printf("size := len(s)\n")
412
- g.gofile.Printf("return C.PyBytes_FromStringAndSize((*C.char)(ptr), C.long(size))\n")
+ if WindowsOS {
413
+ g.gofile.Printf("return C.PyBytes_FromStringAndSize((*C.char)(ptr), C.longlong(size))\n")
414
+ } else {
415
+ g.gofile.Printf("return C.PyBytes_FromStringAndSize((*C.char)(ptr), C.long(size))\n")
416
+ }
417
g.gofile.Outdent()
418
g.gofile.Printf("}\n\n")
419
0 commit comments