diff options
| author | Jeff Carr <[email protected]> | 2025-11-01 10:26:18 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-11-01 10:26:18 -0500 |
| commit | a8ee202a434b6929a2f5488be5b1c0a0e10d6c02 (patch) | |
| tree | 811b002d5e46b2ca223f403f425e9c5962519466 /adder.go | |
| parent | 9e2da246d52558670685ffe86c25787b55c6b4a6 (diff) | |
Diffstat (limited to 'adder.go')
| -rw-r--r-- | adder.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/adder.go b/adder.go new file mode 100644 index 0000000..351a9f0 --- /dev/null +++ b/adder.go @@ -0,0 +1,23 @@ +package main + + +/* +#cgo CFLAGS: -DWIN32 -ID:/pg18headers -ID:/pg18headers/port/win32 +#cgo LDFLAGS: -LD:/pg18lib +#include "postgres.h" +#include "fmgr.h" + + +// Forward declare the C function so cgo compiles add_two.c too. +extern void init_add_two(); +*/ +import "C" + + +//export Adder +func Adder(a C.int32) C.int32 { + return a + 3 +} + + +func main() {} |
