mirror of https://github.com/go-python/gopy.git
generate longlong for gen_slice on windows
This commit is contained in:
parent
feb8731223
commit
5fb68318e0
|
@ -409,7 +409,11 @@ otherwise parameter is a python list that we copy from
|
||||||
g.gofile.Printf("s := deptrFromHandle_Slice_byte(handle)\n")
|
g.gofile.Printf("s := deptrFromHandle_Slice_byte(handle)\n")
|
||||||
g.gofile.Printf("ptr := unsafe.Pointer(&s[0])\n")
|
g.gofile.Printf("ptr := unsafe.Pointer(&s[0])\n")
|
||||||
g.gofile.Printf("size := len(s)\n")
|
g.gofile.Printf("size := len(s)\n")
|
||||||
g.gofile.Printf("return C.PyBytes_FromStringAndSize((*C.char)(ptr), C.long(size))\n")
|
if WindowsOS {
|
||||||
|
g.gofile.Printf("return C.PyBytes_FromStringAndSize((*C.char)(ptr), C.longlong(size))\n")
|
||||||
|
} else {
|
||||||
|
g.gofile.Printf("return C.PyBytes_FromStringAndSize((*C.char)(ptr), C.long(size))\n")
|
||||||
|
}
|
||||||
g.gofile.Outdent()
|
g.gofile.Outdent()
|
||||||
g.gofile.Printf("}\n\n")
|
g.gofile.Printf("}\n\n")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue