From ead10066914172062fed4c4ded5a7b63b2a796f5 Mon Sep 17 00:00:00 2001 From: Gordon <46924906+FGadvancer@users.noreply.github.com> Date: Mon, 20 May 2024 10:19:14 +0800 Subject: [PATCH] fix: convert c char to Go string. --- go/export.go | 2 +- magefile.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go/export.go b/go/export.go index 6820793..49c311a 100644 --- a/go/export.go +++ b/go/export.go @@ -944,7 +944,7 @@ func remove_black(cCallback C.CB_S_I_S_S, operationID *C.char, removeUserID *C.c //export set_friends_ex func set_friends_ex(cCallback C.CB_S_I_S_S, operationID, friendIDs, ex *C.char) { baseCallback := NewBaseCallback(cCallback, operationID) - open_im_sdk.SetFriendsEx(baseCallback, C.GoString(operationID), C.GoString(friendIDs), ex) + open_im_sdk.SetFriendsEx(baseCallback, C.GoString(operationID), C.GoString(friendIDs), C.GoString(ex)) } // =====================================================group=============================================== diff --git a/magefile.go b/magefile.go index df8c83e..2a8330e 100644 --- a/magefile.go +++ b/magefile.go @@ -65,6 +65,8 @@ func BuildIOS() error { cmd := exec.Command("go", "build", "-buildmode=c-shared", "-o", outPath+"/"+soName+".dylib", ".") cmd.Dir = goSrc cmd.Env = os.Environ() + cmd.Stderr = os.Stderr + cmd.Stdout = os.Stdout if err := cmd.Run(); err != nil { fmt.Printf("Failed to build for iOS: %v\n", err)