-
-
Save BenLubar/851d3de63699f50e76ef0f866a0049a3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "example.h" | |
#include "_cgo_export.h" | |
void foo() | |
{ | |
bar(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package example | |
/* | |
#include "example.h" | |
*/ | |
import "C" | |
// Foo is an example that does nothing in a very expensive way. | |
func Foo() { | |
C.foo() | |
} | |
//export bar | |
func bar() { | |
// do nothing | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
void foo(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment