Skip to content

Commit b9f28c8

Browse files
authored
Merge pull request #85 from lightpanda-io/remove_usingnamespace
Remove usingnamespace
2 parents 10025d5 + 9cf021b commit b9f28c8

File tree

2 files changed

+24
-19
lines changed

2 files changed

+24
-19
lines changed

src/inspector_subtypes.zig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
const c = @import("v8.zig").c;
2+
3+
pub export fn v8_inspector__Client__IMPL__valueSubtype(
4+
_: *c.InspectorClientImpl,
5+
value: *const c.Value,
6+
) callconv(.C) [*c]const u8 {
7+
_ = value;
8+
return null;
9+
}
10+
11+
pub export fn v8_inspector__Client__IMPL__descriptionForValueSubtype(
12+
_: *c.InspectorClientImpl,
13+
context: *const c.Context,
14+
value: *const c.Value,
15+
) callconv(.C) [*c]const u8 {
16+
_ = value;
17+
_ = context;
18+
return null;
19+
}

src/v8.zig

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2916,25 +2916,11 @@ pub export fn v8_inspector__Client__IMPL__ensureDefaultContextInGroup(
29162916
return inspector.ctx_handle;
29172917
}
29182918

2919-
usingnamespace if (@import("default_exports").inspector_subtype) struct {
2920-
pub export fn v8_inspector__Client__IMPL__valueSubtype(
2921-
_: *c.InspectorClientImpl,
2922-
value: *const c.Value,
2923-
) callconv(.C) [*c]const u8 {
2924-
_ = value;
2925-
return null;
2926-
}
2927-
2928-
pub export fn v8_inspector__Client__IMPL__descriptionForValueSubtype(
2929-
_: *c.InspectorClientImpl,
2930-
context: *const c.Context,
2931-
value: *const c.Value,
2932-
) callconv(.C) [*c]const u8 {
2933-
_ = value;
2934-
_ = context;
2935-
return null;
2936-
}
2937-
} else struct {};
2919+
comptime {
2920+
if (@import("default_exports").inspector_subtype) {
2921+
_ = @import("inspector_subtypes.zig");
2922+
}
2923+
}
29382924

29392925
// InspectorChannel
29402926

0 commit comments

Comments
 (0)