DescriptionAdd //export to cgo.
The new //export comment marks a Go function as callable from
C. The syntax is "//export NAME" where NAME is the name of
the function as seen from C. If such a comment is seen, cgo
will generate two new files: _cgo_export.h and _cgo_export.c.
The _cgo_export.h file provides declarations which C code may
use to call Go functions. The _cgo_export.c file contains
wrappers, and is to be compiled with gcc.
The changes to Make.pkg support using this from a Go Makefile,
though it could probably be more convenient.
Patch Set 1 #Patch Set 2 : code review 853042: Add //export to cgo. #Patch Set 3 : code review 853042: Add //export to cgo. #Patch Set 4 : code review 853042: Add //export to cgo. #Patch Set 5 : code review 853042: Add //export to cgo. #
MessagesTotal messages: 5
|