packages
The Louise packages, each released on its own
Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.
Dernier runRéussi#28 · main · 3 min 34 s
0Étoiles
0Forks
3Issues
| 1 | /// Bindings for `api.h`, generated by `louise bindgen` with their C shim: |
| 2 | /// do not edit, regenerate. |
| 3 | /// |
| 4 | /// Not bound, or worth knowing: |
| 5 | /// - line 62, `szl_sort_free`: the finalizer of `SzlSort`, not bound. |
| 6 | |
| 7 | import std/ffi.{type Resource} |
| 8 | |
| 9 | /// `struct szl_sort`, opaque. |
| 10 | pub type SzlSort |
| 11 | |
| 12 | /// C: `int64_t szl_find(const char *haystack, size_t haystack_len, const char *needle, size_t needle_len)` |
| 13 | @extern c "louise_szl_find" |
| 14 | pub fn szl_find :: haystack: String needle: String -> Int / <ffi> |
| 15 | |
| 16 | /// C: `int64_t szl_rfind(const char *haystack, size_t haystack_len, const char *needle, size_t needle_len)` |
| 17 | @extern c "louise_szl_rfind" |
| 18 | pub fn szl_rfind :: haystack: String needle: String -> Int / <ffi> |
| 19 | |
| 20 | /// C: `size_t szl_count(const char *haystack, size_t haystack_len, const char *needle, size_t needle_len)` |
| 21 | @extern c "louise_szl_count" |
| 22 | pub fn szl_count :: haystack: String needle: String -> Int / <ffi> |
| 23 | |
| 24 | /// C: `int64_t szl_find_byte(const char *s, size_t len, uint8_t byte)` |
| 25 | @extern c "louise_szl_find_byte" |
| 26 | pub fn szl_find_byte :: s: String byte: Int -> Int / <ffi> |
| 27 | |
| 28 | /// C: `int64_t szl_rfind_byte(const char *s, size_t len, uint8_t byte)` |
| 29 | @extern c "louise_szl_rfind_byte" |
| 30 | pub fn szl_rfind_byte :: s: String byte: Int -> Int / <ffi> |
| 31 | |
| 32 | /// C: `int szl_order(const char *a, size_t a_len, const char *b, size_t b_len)` |
| 33 | @extern c "louise_szl_order" |
| 34 | pub fn szl_order :: a: String b: String -> Int / <ffi> |
| 35 | |
| 36 | /// C: `int64_t szl_hash(const char *s, size_t len, int64_t seed)` |
| 37 | @extern c "louise_szl_hash" |
| 38 | pub fn szl_hash :: s: String seed: Int -> Int / <ffi> |
| 39 | |
| 40 | /// C: `int64_t szl_bytesum(const char *s, size_t len)` |
| 41 | @extern c "louise_szl_bytesum" |
| 42 | pub fn szl_bytesum :: s: String -> Int / <ffi> |
| 43 | |
| 44 | /// C: `const char *szl_version(void)` |
| 45 | @extern c "louise_szl_version" |
| 46 | pub fn szl_version :: -> String / <ffi> |
| 47 | |
| 48 | /// C: `const char *szl_capabilities(void)` |
| 49 | @extern c "louise_szl_capabilities" |
| 50 | pub fn szl_capabilities :: -> String / <ffi> |
| 51 | |
| 52 | /// C: `szl_sort *szl_sort_new(void)` |
| 53 | @extern c "louise_szl_sort_new" |
| 54 | pub fn szl_sort_new :: -> Resource<SzlSort> / <ffi> |
| 55 | |
| 56 | /// C: `bool szl_sort_push(szl_sort *s, const char *text, size_t text_len)` |
| 57 | @extern c "louise_szl_sort_push" |
| 58 | pub fn szl_sort_push :: s: Resource<SzlSort> text: String -> Bool / <ffi> |
| 59 | |
| 60 | /// C: `size_t szl_sort_count(const szl_sort *s)` |
| 61 | @extern c "louise_szl_sort_count" |
| 62 | pub fn szl_sort_count :: s: Resource<SzlSort> -> Int / <ffi> |
| 63 | |
| 64 | /// C: `bool szl_sort_argsort(szl_sort *s)` |
| 65 | @extern c "louise_szl_sort_argsort" |
| 66 | pub fn szl_sort_argsort :: s: Resource<SzlSort> -> Bool / <ffi> |
| 67 | |
| 68 | /// C: `int64_t szl_sort_order(const szl_sort *s, size_t i)` |
| 69 | @extern c "louise_szl_sort_order" |
| 70 | pub fn szl_sort_order :: s: Resource<SzlSort> i: Int -> Int / <ffi> |