diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-06-15 00:01:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-15 00:01:54 +0200 |
commit | 88e671e0b70293f30cf983e48837ebc85e2d5afc (patch) | |
tree | e78987fee0e034a0710ea37f25ac6fa8d78bdfdd /platform/javascript/javascript_singleton.cpp | |
parent | 16027e7cf412140c128e7c002ce0be533b94db00 (diff) | |
parent | 049b5159f13d409ce48e6dd8abccf84ae1d311b3 (diff) |
Merge pull request #49592 from Faless/js/4.x_fix_sigs
[HTML5] Fix build without eval, library functions signatures.
Diffstat (limited to 'platform/javascript/javascript_singleton.cpp')
-rw-r--r-- | platform/javascript/javascript_singleton.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/platform/javascript/javascript_singleton.cpp b/platform/javascript/javascript_singleton.cpp index 5ef67c0cdd..c441ed0517 100644 --- a/platform/javascript/javascript_singleton.cpp +++ b/platform/javascript/javascript_singleton.cpp @@ -28,12 +28,16 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifdef JAVASCRIPT_EVAL_ENABLED - #include "api/javascript_singleton.h" #include "emscripten.h" extern "C" { +extern void godot_js_os_download_buffer(const uint8_t *p_buf, int p_buf_size, const char *p_name, const char *p_mime); +} + +#ifdef JAVASCRIPT_EVAL_ENABLED + +extern "C" { typedef union { int64_t i; double r; @@ -301,7 +305,6 @@ union js_eval_ret { }; extern int godot_js_eval(const char *p_js, int p_use_global_ctx, union js_eval_ret *p_union_ptr, void *p_byte_arr, void *p_byte_arr_write, void *(*p_callback)(void *p_ptr, void *p_ptr2, int p_len)); -extern int godot_js_os_download_buffer(const uint8_t *p_buf, int p_buf_size, const char *p_name, const char *p_mime); } void *resize_PackedByteArray_and_open_write(void *p_arr, void *r_write, int p_len) { |