diff options
Diffstat (limited to 'cshared/README.md')
-rw-r--r-- | cshared/README.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cshared/README.md b/cshared/README.md index 51e424e..ea32b4b 100644 --- a/cshared/README.md +++ b/cshared/README.md @@ -72,8 +72,8 @@ and it is the responsibility of the other side to `free()` it or it will leak otherwise. Another tricky part is in `c_std_map_get_str_str` and similar places -where you need to return `*C.char` from an unaddressed array accessed under +where you need to return `*C.char` from an unaddressable array accessed under a pseudonym type through reflection. The only way I've found working -is using `reflect.Copy` to byte slice (copy) and then conversion to -`string` (copy), then `C.CString` (copy) and finally another (copy) on the -receiving side because the latter must be `free()`-d. Extremely efficient.
\ No newline at end of file +is using `reflect.Copy` to byte slice (copy), then `CBytes` (copy) and +finally another (copy) on the receiving side because the latter must be +`free()`-d.
\ No newline at end of file |