better comptime
This commit is contained in:
@@ -37,7 +37,7 @@ const State = struct {
|
||||
|
||||
// global_state is initialized on first call to an nss function
|
||||
var global_state: State = undefined;
|
||||
var global_start = once(init);
|
||||
var global_init = once(init);
|
||||
|
||||
// assigns State from environment variables et al
|
||||
fn init() void {
|
||||
@@ -80,7 +80,7 @@ export fn _nss_turbo_getpwuid_r(
|
||||
len: usize,
|
||||
errnop: *c_int,
|
||||
) c.enum_nss_status {
|
||||
global_start.call();
|
||||
global_init.call();
|
||||
|
||||
if (global_state.file == null) {
|
||||
errnop.* = @enumToInt(os.E.AGAIN);
|
||||
|
||||
Reference in New Issue
Block a user