1
Fork 0
turbonss/lib/State.zig

16 lines
399 B
Zig
Raw Normal View History

2022-04-20 05:41:11 +03:00
const std = @import("std");
const os = std.os;
const DB = @import("DB.zig");
const PackedUser = @import("PackedUser.zig");
// State is a type of the global variable holding the process state:
// the DB handle and all the iterators.
const State = struct {
DB: *const DB,
getpwent_iterator: *PackedUser.Iterator,
};
// state is initialized on library startup.
var state: State = undefined;