From 9ca7e82c82644818222fff9fa736470ea65ecff9 Mon Sep 17 00:00:00 2001 From: Reuben Dunnington Date: Tue, 22 Aug 2023 14:11:46 -0700 Subject: [PATCH] flatten oc_request_quit() binding --- src/app/app.h | 5 +++++ src/app/orca_app.c | 7 ------- src/wasmbind/core_api.json | 4 +++- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/app.h b/src/app/app.h index dec985c..88e945d 100644 --- a/src/app/app.h +++ b/src/app/app.h @@ -287,6 +287,7 @@ extern "C" ORCA_API bool oc_should_quit(void); ORCA_API void oc_cancel_quit(void); + ORCA_API void oc_request_quit(void); ORCA_API void oc_set_cursor(oc_mouse_cursor cursor); @@ -401,6 +402,10 @@ extern "C" ORCA_API int oc_directory_create(oc_str8 path); +#else + + void ORCA_IMPORT(oc_request_quit)(void); + #endif // !defined(OC_PLATFORM_ORCA) || !(OC_PLATFORM_ORCA) #ifdef __cplusplus diff --git a/src/app/orca_app.c b/src/app/orca_app.c index ae046d3..fd349f0 100644 --- a/src/app/orca_app.c +++ b/src/app/orca_app.c @@ -2,10 +2,3 @@ //This is used to pass raw events from the runtime ORCA_EXPORT oc_event oc_rawEvent; - -void ORCA_IMPORT(oc_request_quit_stub)(void); - -void oc_request_quit() -{ - oc_request_quit_stub(); -} diff --git a/src/wasmbind/core_api.json b/src/wasmbind/core_api.json index 2286851..9ffc568 100644 --- a/src/wasmbind/core_api.json +++ b/src/wasmbind/core_api.json @@ -62,10 +62,12 @@ "name": "oc_get_host_platform", "cname": "oc_get_host_platform", "ret": {"name": "int", "tag": "i"}, + "args": [] }, { - "name": "oc_request_quit_stub", + "name": "oc_request_quit", "cname": "oc_request_quit", "ret": {"name": "void", "tag": "v"}, + "args": [] } ]