| ... | ... | @@ -449,9 +449,11 @@ pub const Int = struct { |
| 449 | 449 | comptime FmtError: type, |
| 450 | 450 | output: fn (@typeOf(context), []const u8) FmtError!void, |
| 451 | 451 | ) FmtError!void { |
| 452 | self.assertWritable(); |
| 452 | 453 | // TODO look at fmt and support other bases |
| 453 | | const str = self.toString(self.allocator, 10) catch @panic("TODO make this non allocating"); |
| 454 | | defer self.allocator.free(str); |
| 454 | // TODO support read-only fixed integers |
| 455 | const str = self.toString(self.allocator.?, 10) catch @panic("TODO make this non allocating"); |
| 456 | defer self.allocator.?.free(str); |
| 455 | 457 | return output(context, str); |
| 456 | 458 | } |
| 457 | 459 | |