File tree Expand file tree Collapse file tree 2 files changed +8
-11
lines changed
Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,7 @@ pub const meta: zigplug.Meta = .{
2727
2828pub const clap_meta : @import ("zigplug_clap" ).Meta = .{
2929 .id = "com.bandithedoge.zigplug_sine_example" ,
30- // .features = &.{ .instrument, .synthesizer, .mono },
31- .features = &.{},
30+ .features = &.{ .instrument , .synthesizer , .mono },
3231};
3332
3433gpa : std .heap .GeneralPurposeAllocator (.{}) = .init ,
Original file line number Diff line number Diff line change @@ -302,15 +302,13 @@ fn makeClapDescriptor(comptime Plugin: type) std.mem.Allocator.Error!*const c.cl
302302 .support_url = meta .support_url orelse meta .url ,
303303 .version = meta .version ,
304304 .description = meta .description ,
305- .features = &[_ ][* c ]const u8 {null },
306- // TODO: actually implement features
307- // .features = blk: {
308- // var features: [clap_meta.features.len + 1:null]?[*:0]const u8 = undefined;
309- // inline for (clap_meta.features, 0..) |feature, i|
310- // features[i] = feature.toString();
311- // // features[clap_meta.features.len] = null;
312- // break :blk &features;
313- // },
305+ .features = blk : {
306+ const features = try std .heap .page_allocator .alloc ([* c ]const u8 , clap_meta .features .len + 1 );
307+ inline for (clap_meta .features , 0.. ) | feature , i |
308+ features [i ] = feature .toString ();
309+ features [clap_meta .features .len ] = null ;
310+ break :blk features .ptr ;
311+ },
314312 };
315313
316314 return desc ;
You can’t perform that action at this time.
0 commit comments