- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for goWithString (0.16 sec)
-
src/cmd/cgo/internal/test/callback_c.c
} int returnAfterGrowFromGo(void) { extern int goReturnVal(void); return goReturnVal(); } void callGoWithString(void) { extern void goWithString(GoString); const char *str = "string passed from C to Go"; goWithString((GoString){str, strlen(str)});
C - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri May 12 12:00:02 GMT 2023 - 933 bytes - Viewed (0) -
src/cmd/cgo/internal/test/callback.go
want := "string passed from C to Go" if stringFromGo != want { t.Errorf("string passed through C is %s, want %s", stringFromGo, want) } } var stringFromGo string //export goWithString func goWithString(s string) { stringFromGo = s } func testCallbackStack(t *testing.T) { // Make cgo call and callback with different amount of stack available.
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri May 12 12:00:02 GMT 2023 - 111.5K bytes - Viewed (0)