Skip to content

Commit

Permalink
Merge pull request #12 from FGadvancer/main
Browse files Browse the repository at this point in the history
fix: convert c char to Go string.
  • Loading branch information
FGadvancer authored May 20, 2024
2 parents 8c78e76 + ead1006 commit 04332e7
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 04332e7

Please sign in to comment.