Skip to content

Commit f6edc9d

Browse files
committed
Update og_variant_has_internal_diagnostics
1 parent a776c91 commit f6edc9d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Sources/OpenGraphCxx/DebugServer/DebugServer.mm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
#include <assert.h>
3030

3131
OG_EXTERN_C_BEGIN
32-
bool os_variant_has_internal_diagnostics(const char *subsystem);
32+
// DYLD_INTERPOSE does not work. Directly use the hook one here to match the semantics.
33+
bool og_variant_has_internal_diagnostics(const char *subsystem);
3334
OG_EXTERN_C_END
3435

3536
// MARK: DebugServer public API Implementation
@@ -264,7 +265,7 @@
264265
if (
265266
(mode & OGDebugServerModeValid)
266267
&& !OG::DebugServer::has_shared_server()
267-
// && os_variant_has_internal_diagnostics("org.OpenSwiftUIProject.OpenGraph")
268+
&& og_variant_has_internal_diagnostics("org.OpenSwiftUIProject.OpenGraph")
268269
) {
269270
_shared_server = new DebugServer(mode);
270271
}

Sources/OpenGraphCxx/DebugServer/interpose.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212

1313
extern bool os_variant_has_internal_diagnostics(const char *subsystem);
1414

15-
bool os_variant_has_internal_diagnostics_og_hook(const char *subsystem) {
15+
bool og_variant_has_internal_diagnostics(const char *subsystem) {
1616
if (strcmp(subsystem, "org.OpenSwiftUIProject.OpenGraph") == 0) {
1717
return true;
1818
} else {
1919
return os_variant_has_internal_diagnostics(subsystem);
2020
}
2121
}
2222

23-
DYLD_INTERPOSE(os_variant_has_internal_diagnostics_og_hook, os_variant_has_internal_diagnostics)
23+
DYLD_INTERPOSE(og_variant_has_internal_diagnostics, os_variant_has_internal_diagnostics)

0 commit comments

Comments
 (0)