tobogganSe connecter

louise

The Louise language: compiler, runtime, std, tooling

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

44 lignes · 1561 octetsBrut · Historique
1/// Bindings for `sortkit.h`, generated by `louise bindgen` with their C shim:
2/// do not edit, regenerate.
3///
4/// Not bound, or worth knowing:
5/// - line 30, `sk_vec_free`: the finalizer of `SkVec`, not bound.
6/// - line 49, `struct sk_stats`: a struct with fields.
7/// - line 53, `sk_vec_stats`: `sk_stats`: only pointers to opaque structs are supported.
8/// - line 54, `sk_sort_raw`: the callback `int (*)(const void *, const void *)` needs exactly one `void *` parameter, its environment.
9
10import std/ffi.{type Resource}
11
12/// `struct sk_vec`, opaque.
13pub type SkVec
14
15/// C: `sk_vec *sk_vec_new(void)`
16@extern c "louise_sk_vec_new"
17pub fn sk_vec_new :: -> Resource<SkVec> / <ffi>
18
19/// C: `size_t sk_vec_len(const sk_vec *v)`
20@extern c "louise_sk_vec_len"
21pub fn sk_vec_len :: v: Resource<SkVec> -> Int / <ffi>
22
23/// C: `bool sk_vec_push(sk_vec *v, int64_t x)`
24@extern c "louise_sk_vec_push"
25pub fn sk_vec_push :: v: Resource<SkVec> x: Int -> Bool / <ffi>
26
27/// C: `int64_t sk_vec_get(const sk_vec *v, size_t i)`
28@extern c "louise_sk_vec_get"
29pub fn sk_vec_get :: v: Resource<SkVec> i: Int -> Int / <ffi>
30
31/// C: `size_t sk_vec_sort(sk_vec *v, sk_compare cmp, void *env)`
32@extern c "louise_sk_vec_sort"
33pub fn sk_vec_sort ::
34 v: Resource<SkVec>
35 cmp: fn(Int, Int) -> Int / <ffi>
36 -> Int / <ffi>
37
38/// C: `size_t sk_count_byte(const char *s, size_t len, int c)`
39@extern c "louise_sk_count_byte"
40pub fn sk_count_byte :: s: String c: Int -> Int / <ffi>
41
42/// C: `const char *sk_version(void)`
43@extern c "louise_sk_version"
44pub fn sk_version :: -> String / <ffi>