@@ -101,14 +101,14 @@ var recursive_panic = false;
101101pub fn panic (message : []const u8 , stack_trace : ? * std.builtin.StackTrace , _ : ? usize ) noreturn {
102102 var logger = LogWriter { .log_level = android .ANDROID_LOG_ERROR };
103103
104- if (@atomicLoad (bool , & recursive_panic , .SeqCst )) {
104+ if (@atomicLoad (bool , & recursive_panic , .seq_cst )) {
105105 logger .writer ().print ("RECURSIVE PANIC: {s}\n " , .{message }) catch {};
106106 while (true ) {
107107 std .time .sleep (std .time .ns_per_week );
108108 }
109109 }
110110
111- @atomicStore (bool , & recursive_panic , true , .SeqCst );
111+ @atomicStore (bool , & recursive_panic , true , .seq_cst );
112112
113113 logger .writer ().print ("PANIC: {s}\n " , .{message }) catch {};
114114
@@ -140,7 +140,7 @@ pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usi
140140
141141 logger .writer ().writeAll ("<-- end of stack trace -->\n " ) catch {};
142142
143- std .os .exit (1 );
143+ std .process .exit (1 );
144144}
145145
146146const LogWriter = struct {
@@ -231,9 +231,9 @@ fn makeNativeActivityGlue(comptime App: type) android.ANativeActivityCallbacks {
231231 if (activity .instance ) | instance | {
232232 const result = @call (.auto , @field (App , func ), .{@as (* App , @ptrCast (@alignCast (instance )))} ++ args );
233233 switch (@typeInfo (@TypeOf (result ))) {
234- .ErrorUnion = > result catch | err | app_log .err ("{s} returned error {s}" , .{ func , @errorName (err ) }),
235- .Void = > {},
236- .ErrorSet = > app_log .err ("{s} returned error {s}" , .{ func , @errorName (result ) }),
234+ .error_union = > result catch | err | app_log .err ("{s} returned error {s}" , .{ func , @errorName (err ) }),
235+ .void = > {},
236+ .error_set = > app_log .err ("{s} returned error {s}" , .{ func , @errorName (result ) }),
237237 else = > @compileError ("callback must return void!" ),
238238 }
239239 }
@@ -329,7 +329,7 @@ fn makeNativeActivityGlue(comptime App: type) android.ANativeActivityCallbacks {
329329 };
330330}
331331
332- inline fn printSymbolInfoAt (st_index : usize , maybe_debug_info : ? * std.debug.DebugInfo , int_addr : usize ) void {
332+ inline fn printSymbolInfoAt (st_index : usize , maybe_debug_info : ? * std.debug.SelfInfo , int_addr : usize ) void {
333333 var symbol_name_buffer : [1024 ]u8 = undefined ;
334334 var symbol_name : ? []const u8 = null ;
335335
@@ -346,9 +346,9 @@ inline fn printSymbolInfoAt(st_index: usize, maybe_debug_info: ?*std.debug.Debug
346346 & symbol_name_buffer ,
347347 "{s} {s} {s}" ,
348348 .{
349- symbol .symbol_name ,
349+ symbol .name ,
350350 symbol .compile_unit_name ,
351- fmtMaybeLineInfo (symbol .line_info ),
351+ fmtMaybeLineInfo (symbol .source_location ),
352352 },
353353 ) catch symbol_name ;
354354 } else | _ | {}
@@ -362,7 +362,7 @@ inline fn printSymbolInfoAt(st_index: usize, maybe_debug_info: ?*std.debug.Debug
362362 });
363363}
364364
365- fn realFmtMaybeLineInfo (self : ? std.debug.LineInfo , comptime fmt : []const u8 , options : std.fmt.FormatOptions , writer : anytype ) ! void {
365+ fn realFmtMaybeLineInfo (self : ? std.debug.SourceLocation , comptime fmt : []const u8 , options : std.fmt.FormatOptions , writer : anytype ) ! void {
366366 _ = fmt ;
367367 _ = options ;
368368 if (self ) | li | {
@@ -376,7 +376,7 @@ fn realFmtMaybeLineInfo(self: ?std.debug.LineInfo, comptime fmt: []const u8, opt
376376 }
377377}
378378
379- fn fmtMaybeLineInfo (li : ? std.debug.LineInfo ) std.fmt.Formatter (realFmtMaybeLineInfo ) {
379+ fn fmtMaybeLineInfo (li : ? std.debug.SourceLocation ) std.fmt.Formatter (realFmtMaybeLineInfo ) {
380380 return std .fmt .Formatter (realFmtMaybeLineInfo ){
381381 .data = li ,
382382 };
0 commit comments