aboutsummaryrefslogtreecommitdiff
path: root/modules/nativescript/register_types.cpp
diff options
context:
space:
mode:
authorKarroffel2017-07-27 09:23:21 +0200
committerKarroffel2017-07-27 11:13:21 +0200
commit135c2112ad87265d35899dede34c3a7e06ec2f54 (patch)
tree87dc648f137a9d0d47766b281427766f621ad48f /modules/nativescript/register_types.cpp
parenta2795e95318f57747dbb86a2a12b3567838b8c7d (diff)
downloadgodot-135c2112ad87265d35899dede34c3a7e06ec2f54.tar.gz
godot-135c2112ad87265d35899dede34c3a7e06ec2f54.tar.zst
godot-135c2112ad87265d35899dede34c3a7e06ec2f54.zip
added an optional parameter to OS symbol lookup
When looking up a symbol from a library, previously an error was shown when the symbol did not exist. That caused confusion when the lookup was completely optional. This adds a new parameter to that method so that those errors can be handled manually if needed.
Diffstat (limited to 'modules/nativescript/register_types.cpp')
-rw-r--r--modules/nativescript/register_types.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/nativescript/register_types.cpp b/modules/nativescript/register_types.cpp
index a8a931343..dfa16d8a2 100644
--- a/modules/nativescript/register_types.cpp
+++ b/modules/nativescript/register_types.cpp
@@ -50,7 +50,8 @@ void init_call_cb(void *p_handle, godot_string *p_proc_name, void *p_data, int p
Error err = OS::get_singleton()->get_dynamic_library_symbol_handle(
p_handle,
*(String *)p_proc_name,
- library_proc);
+ library_proc,
+ true); // we print our own message
if (err != OK) {
ERR_PRINT((String("GDNative procedure \"" + *(String *)p_proc_name) + "\" does not exists and can't be called").utf8().get_data());
return;
@@ -75,7 +76,8 @@ void thread_call_cb(void *p_handle, godot_string *p_proc_name, void *p_data, int
Error err = OS::get_singleton()->get_dynamic_library_symbol_handle(
p_handle,
*(String *)p_proc_name,
- library_proc);
+ library_proc,
+ true);
if (err != OK) {
// it's fine if thread callbacks are not present in the library.
return;