const c = @import("c"); const zpy = @import("../root.zig"); pub const Fast = extern struct { const Self = @This(); data: c.PyObject, pub fn size(self: *Self) !usize { return @intCast(c.PySequence_Fast_GET_SIZE(@ptrCast(self))); } pub fn get(self: *Self, index: usize) *zpy.Object { return @ptrCast(c.PySequence_Fast_GET_ITEM(@ptrCast(self), @intCast(index)) orelse return error.Exception); } pub fn items(self: *Self) [*:null][*c]zpy.Object { return @ptrCast(c.PySequence_Fast_ITEMS(@ptrCast(self))); } };