mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
17 lines
468 B
Zig
17 lines
468 B
Zig
const c = @import("c.zig").c;
|
|
const Encoding = @import("types.zig").Encoding;
|
|
const errors = @import("errors.zig");
|
|
|
|
/// Call once per process to initialize Oniguruma. This should be given
|
|
/// the encodings that the program will use.
|
|
pub fn init(encs: []const *Encoding) !void {
|
|
_ = try errors.convertError(c.onig_initialize(
|
|
@constCast(@ptrCast(@alignCast(encs.ptr))),
|
|
@intCast(encs.len),
|
|
));
|
|
}
|
|
|
|
pub fn deinit() void {
|
|
_ = c.onig_end();
|
|
}
|