Skip to content

Commit

Permalink
fix: convert c char to Go string.
Browse files Browse the repository at this point in the history
  • Loading branch information
FGadvancer committed May 20, 2024
1 parent cc37612 commit ead1006
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -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===============================================
Expand Down
2 changes: 2 additions & 0 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ead1006

Please sign in to comment.