aboutsummaryrefslogtreecommitdiff
path: root/salticidae.go
blob: 0698f39ea80371906cd3a09de3d2efec5060e0ef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package salticidae


// #cgo CFLAGS: -I${SRCDIR}/salticidae/include/
// #cgo LDFLAGS: ${SRCDIR}/salticidae/libsalticidae.so -Wl,-rpath=${SRCDIR}/salticidae/
// #include "salticidae/util.h"
import "C"
import "unsafe"

type rawptr_t = unsafe.Pointer
type Opcode = uint8
type Error = C.struct_SalticidaeCError

func (self *Error) GetCode() int { return int((*C.struct_SalticidaeCError)(self).code) }

func NewError() Error {
    return C.struct_SalticidaeCError {}
}

func StrError(code int) string {
    return C.GoString(C.salticidae_strerror(C.int(code)))
}