mirror of
https://github.com/ziglang/zig.git
synced 2024-11-15 00:26:57 +00:00
std.tz: fix function returning pointer to local variable
This commit is contained in:
parent
b9dcbe6b4c
commit
a224dfceee
@ -11,7 +11,7 @@ pub const Timetype = struct {
|
||||
flags: u8,
|
||||
name_data: [6:0]u8,
|
||||
|
||||
pub fn name(self: Timetype) [:0]const u8 {
|
||||
pub fn name(self: *const Timetype) [:0]const u8 {
|
||||
return std.mem.sliceTo(self.name_data[0..], 0);
|
||||
}
|
||||
|
||||
@ -214,7 +214,6 @@ pub const Tz = struct {
|
||||
};
|
||||
|
||||
test "slim" {
|
||||
if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO
|
||||
const data = @embedFile("tz/asia_tokyo.tzif");
|
||||
var in_stream = std.io.fixedBufferStream(data);
|
||||
|
||||
@ -228,7 +227,6 @@ test "slim" {
|
||||
}
|
||||
|
||||
test "fat" {
|
||||
if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO
|
||||
const data = @embedFile("tz/antarctica_davis.tzif");
|
||||
var in_stream = std.io.fixedBufferStream(data);
|
||||
|
||||
@ -241,7 +239,6 @@ test "fat" {
|
||||
}
|
||||
|
||||
test "legacy" {
|
||||
if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO
|
||||
// Taken from Slackware 8.0, from 2001
|
||||
const data = @embedFile("tz/europe_vatican.tzif");
|
||||
var in_stream = std.io.fixedBufferStream(data);
|
||||
|
Loading…
Reference in New Issue
Block a user