func (r *Rules) Save(path string) error { cpath := C.CString(path) code := C.yr_rules_save(r.handle, cpath) C.free(unsafe.Pointer(cpath)) if code != C.ERROR_SUCCESS { return Error(code) } return nil }
// Save writes a compiled ruleset to filename. func (r *Rules) Save(filename string) (err error) { cfilename := C.CString(filename) defer C.free(unsafe.Pointer(cfilename)) err = newError(C.yr_rules_save(r.cptr, cfilename)) return }