hyperscan/bindings

Search:
Group by:

Types

HsAllocFunc = proc (size: csize_t): pointer {.cdecl.}
HsCompileError {.importc: "hs_compile_error_t", header: "hs/hs_compile.h",
                 bycopy.} = object
  message*: cstring
  expression*: cint
HsDatabase {.importc: "hs_database_t", header: "hs/hs.h", incompleteStruct,
             byCopy.} = object
HsError = cint
HsExprExt {.importc: "hs_expr_ext_t", header: "hs/hs_compile.h", bycopy.} = object
  flags*: culonglong
  min_offset*: culonglong
  max_offset*: culonglong
  min_length*: culonglong
  edit_distance*: cuint
  hamming_distance*: cuint
HsExprInfo {.importc: "hs_expr_info_t", header: "hs/hs_compile.h", bycopy.} = object
  min_width*: cuint
  max_width*: cuint
  unordered_matches*: cchar
  matches_at_eod*: cchar
  matches_only_at_eod*: cchar
HsFreeFunc = proc (p: pointer) {.cdecl.}
HsPlatformInfo {.importc: "hs_platform_info_t", header: "hs/hs_compile.h",
                 bycopy.} = object
  tune*: cuint
  cpu_features*: culonglong
  reserved1*: culonglong
  reserved2*: culonglong
HsScratch {.importc: "hs_scratch_t", header: "hs/hs_runtime.h", incompleteStruct.} = object
HsStream {.importc: "hs_stream_t", header: "hs/hs_runtime.h", incompleteStruct.} = object
MatchEventHandler = proc (id: cuint; fromOffset: culonglong;
                          toOffset: culonglong; flags: cuint; context: pointer): cint {.
    cdecl.}

Procs

proc hs_alloc_scratch(db: HsDatabasePtr; scratch: ptr HsScratchPtr): HsError {.
    importc, header: "hs/hs_runtime.h", ...raises: [], tags: [], forbids: [].}
proc hs_clone_scratch(src: HsScratchPtr; dest: ptr HsScratchPtr): HsError {.
    importc, header: "hs/hs_runtime.h", ...raises: [], tags: [], forbids: [].}
proc hs_close_stream(id: HsStreamPtr; scratch: HsScratchPtr;
                     onEvent: MatchEventHandler; ctxt: pointer): HsError {.
    importc, header: "hs/hs_runtime.h", ...raises: [], tags: [], forbids: [].}
proc hs_compile(expression: cstring; flags: cuint; mode: cuint;
                platform: HsPlatformInfoPtr; db: ptr HsDatabasePtr;
                error: ptr HsCompileErrorPtr): HsError {.importc,
    header: "hs/hs_compile.h", ...raises: [], tags: [], forbids: [].}
proc hs_compile_ext_multi(expressions: ptr cstring; flags: ptr cuint;
                          ids: ptr cuint; ext: ptr ptr HsExprExt;
                          elements: cuint; mode: cuint;
                          platform: HsPlatformInfoPtr; db: ptr HsDatabasePtr;
                          error: ptr HsCompileErrorPtr): HsError {.importc,
    header: "hs/hs_compile.h", ...raises: [], tags: [], forbids: [].}
proc hs_compile_lit(expression: cstring; flags: cuint; len: csize_t;
                    mode: cuint; platform: HsPlatformInfoPtr;
                    db: ptr HsDatabasePtr; error: ptr HsCompileErrorPtr): HsError {.
    importc, header: "hs/hs_compile.h", ...raises: [], tags: [], forbids: [].}
proc hs_compile_lit_multi(expressions: ptr cstring; flags: ptr cuint;
                          ids: ptr cuint; lens: ptr csize_t; elements: cuint;
                          mode: cuint; platform: HsPlatformInfoPtr;
                          db: ptr HsDatabasePtr; error: ptr HsCompileErrorPtr): HsError {.
    importc, header: "hs/hs_compile.h", ...raises: [], tags: [], forbids: [].}
proc hs_compile_multi(expressions: ptr cstring; flags: ptr cuint;
                      ids: ptr cuint; elements: cuint; mode: cuint;
                      platform: HsPlatformInfoPtr; db: ptr HsDatabasePtr;
                      error: ptr HsCompileErrorPtr): HsError {.importc,
    header: "hs/hs_compile.h", ...raises: [], tags: [], forbids: [].}
proc hs_compress_stream(stream: HsStreamPtr; buf: ptr UncheckedArray[byte];
                        buf_space: csize_t; used_space: ptr csize_t): HsError {.
    importc, header: "hs/hs_runtime.h", ...raises: [], tags: [], forbids: [].}
proc hs_copy_stream(to_id: ptr HsStreamPtr; from_id: HsStreamPtr): HsError {.
    importc, header: "hs/hs_runtime.h", ...raises: [], tags: [], forbids: [].}
proc hs_database_info(database: HsDatabasePtr; info: ptr cstring): HsError {.
    importc, header: "hs/hs.h", ...raises: [], tags: [], forbids: [].}
proc hs_database_size(database: HsDatabasePtr; database_size: ptr csize_t): HsError {.
    importc, header: "hs/hs.h", ...raises: [], tags: [], forbids: [].}
proc hs_deserialize_database(bytes: cstring; length: csize_t;
                             db: ptr HsDatabasePtr): HsError {.importc,
    header: "hs/hs.h", ...raises: [], tags: [], forbids: [].}
proc hs_deserialize_database_at(bytes: cstring; length: csize_t;
                                db: HsDatabasePtr): HsError {.importc,
    header: "hs/hs.h", ...raises: [], tags: [], forbids: [].}
proc hs_expand_stream(db: HsDatabasePtr; stream: ptr HsStreamPtr;
                      buf: ptr UncheckedArray[byte]; buf_size: csize_t): HsError {.
    importc, header: "hs/hs_runtime.h", ...raises: [], tags: [], forbids: [].}
proc hs_expression_ext_info(expression: cstring; flags: cuint;
                            ext: HsExprExtPtr; info: ptr HsExprInfoPtr;
                            error: ptr HsCompileErrorPtr): HsError {.importc,
    header: "hs/hs_compile.h", ...raises: [], tags: [], forbids: [].}
proc hs_expression_info(expression: cstring; flags: cuint;
                        info: ptr HsExprInfoPtr; error: ptr HsCompileErrorPtr): HsError {.
    importc, header: "hs/hs_compile.h", ...raises: [], tags: [], forbids: [].}
proc hs_free_compile_error(error: HsCompileErrorPtr): HsError {.importc,
    header: "hs/hs_compile.h", ...raises: [], tags: [], forbids: [].}
proc hs_free_database(db: HsDatabasePtr): HsError {.importc, header: "hs/hs.h",
    ...raises: [], tags: [], forbids: [].}
proc hs_free_scratch(scratch: HsScratchPtr): HsError {.importc,
    header: "hs/hs_runtime.h", ...raises: [], tags: [], forbids: [].}
proc hs_open_stream(db: HsDatabasePtr; flags: cuint; stream: ptr HsStreamPtr): HsError {.
    importc, header: "hs/hs_runtime.h", ...raises: [], tags: [], forbids: [].}
proc hs_populate_platform(platform: HsPlatformInfoPtr): HsError {.importc,
    header: "hs/hs_compile.h", ...raises: [], tags: [], forbids: [].}
proc hs_reset_and_copy_stream(to_id: HsStreamPtr; from_id: HsStreamPtr;
                              scratch: HsScratchPtr; onEvent: MatchEventHandler;
                              context: pointer): HsError {.importc,
    header: "hs/hs_runtime.h", ...raises: [], tags: [], forbids: [].}
proc hs_reset_and_expand_stream(to_stream: HsStreamPtr;
                                buf: ptr UncheckedArray[byte];
                                buf_size: csize_t; scratch: HsScratchPtr;
                                onEvent: MatchEventHandler; context: pointer): HsError {.
    importc, header: "hs/hs_runtime.h", ...raises: [], tags: [], forbids: [].}
proc hs_reset_stream(id: HsStreamPtr; flags: cuint; scratch: HsScratchPtr;
                     onEvent: MatchEventHandler; context: pointer): HsError {.
    importc, header: "hs/hs_runtime.h", ...raises: [], tags: [], forbids: [].}
proc hs_scan(db: HsDatabasePtr; data: cstring; length: cuint; flags: cuint;
             scratch: HsScratchPtr; onEvent: MatchEventHandler; context: pointer): HsError {.
    importc, header: "hs/hs_runtime.h", ...raises: [], tags: [], forbids: [].}
proc hs_scan_stream(id: HsStreamPtr; data: cstring; length: cuint; flags: cuint;
                    scratch: HsScratchPtr; onEvent: MatchEventHandler;
                    ctxt: pointer): HsError {.importc,
    header: "hs/hs_runtime.h", ...raises: [], tags: [], forbids: [].}
proc hs_scan_vector(db: HsDatabasePtr; data: ptr cstring; length: ptr cuint;
                    count: cuint; flags: cuint; scratch: HsScratchPtr;
                    onEvent: MatchEventHandler; context: pointer): HsError {.
    importc, header: "hs/hs_runtime.h", ...raises: [], tags: [], forbids: [].}
proc hs_scratch_size(scratch: HsScratchPtr; scratch_size: ptr csize_t): HsError {.
    importc, header: "hs/hs_runtime.h", ...raises: [], tags: [], forbids: [].}
proc hs_serialize_database(db: HsDatabasePtr; bytes: ptr cstring;
                           length: ptr csize_t): HsError {.importc,
    header: "hs/hs.h", ...raises: [], tags: [], forbids: [].}
proc hs_serialized_database_info(bytes: cstring; length: csize_t;
                                 info: ptr cstring): HsError {.importc,
    header: "hs/hs.h", ...raises: [], tags: [], forbids: [].}
proc hs_serialized_database_size(bytes: cstring; length: csize_t;
                                 deserialized_size: ptr csize_t): HsError {.
    importc, header: "hs/hs.h", ...raises: [], tags: [], forbids: [].}
proc hs_set_allocator(alloc_func: HsAllocFunc; free_func: HsFreeFunc): HsError {.
    importc, header: "hs/hs.h", ...raises: [], tags: [], forbids: [].}
proc hs_set_database_allocator(alloc_func: HsAllocFunc; free_func: HsFreeFunc): HsError {.
    importc, header: "hs/hs.h", ...raises: [], tags: [], forbids: [].}
proc hs_set_misc_allocator(alloc_func: HsAllocFunc; free_func: HsFreeFunc): HsError {.
    importc, header: "hs/hs.h", ...raises: [], tags: [], forbids: [].}
proc hs_set_scratch_allocator(alloc_func: HsAllocFunc; free_func: HsFreeFunc): HsError {.
    importc, header: "hs/hs.h", ...raises: [], tags: [], forbids: [].}
proc hs_set_stream_allocator(alloc_func: HsAllocFunc; free_func: HsFreeFunc): HsError {.
    importc, header: "hs/hs.h", ...raises: [], tags: [], forbids: [].}
proc hs_stream_size(database: HsDatabasePtr; stream_size: ptr csize_t): HsError {.
    importc, header: "hs/hs.h", ...raises: [], tags: [], forbids: [].}
proc hs_valid_platform(): HsError {.importc, header: "hs/hs.h", ...raises: [],
                                    tags: [], forbids: [].}
proc hs_version(): cstring {.importc, header: "hs/hs.h", ...raises: [], tags: [],
                             forbids: [].}