cgo: full test

cgo: test returning void
This commit is contained in:
Li Jie
2024-11-26 11:23:46 +08:00
parent 39dc68fa4e
commit c9f436cc47
9 changed files with 207 additions and 0 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))
}