mirror of
https://github.com/go-gst/go-gst.git
synced 2025-10-15 12:30:41 +08:00
* Fix #004: build fails on 32 bit architectures * Bump go-glib to v0.0.25 Co-authored-by: Niels Avonds <niels@nobi.life>
This commit is contained in:
@@ -5,6 +5,7 @@ import "C"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
@@ -62,7 +63,7 @@ func formatOffset(offset C.gfloat) string {
|
||||
// goStrings returns a string slice for an array of size argc starting at the address argv.
|
||||
func goStrings(argc C.int, argv **C.gchar) []string {
|
||||
length := int(argc)
|
||||
tmpslice := (*[1 << 30]*C.gchar)(unsafe.Pointer(argv))[:length:length]
|
||||
tmpslice := (*[(math.MaxInt32 - 1) / unsafe.Sizeof((*C.gchar)(nil))]*C.gchar)(unsafe.Pointer(argv))[:length:length]
|
||||
gostrings := make([]string, length)
|
||||
for i, s := range tmpslice {
|
||||
gostrings[i] = C.GoString(s)
|
||||
|
Reference in New Issue
Block a user