demo/cgofull: add multi cgo module and macro calling

This commit is contained in:
Li Jie
2024-11-26 09:20:06 +08:00
parent d6c527f662
commit 39dc68fa4e
3 changed files with 38 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
package pymod2
/*
#cgo pkg-config: python3-embed
#include <Python.h>
*/
import "C"
func Long(l int64) *C.PyObject {
return C.PyLong_FromLongLong(C.longlong(l))
}