aboutsummaryrefslogtreecommitdiff
path: root/salticidae.go
blob: f977fbd68b4abcbd8279a25184c0cadcd36de82c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package 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)))
}