diff options
| author | Karroffel | 2017-07-27 09:23:21 +0200 |
|---|---|---|
| committer | Karroffel | 2017-07-27 11:13:21 +0200 |
| commit | 135c2112ad87265d35899dede34c3a7e06ec2f54 (patch) | |
| tree | 87dc648f137a9d0d47766b281427766f621ad48f /modules/nativescript/register_types.cpp | |
| parent | a2795e95318f57747dbb86a2a12b3567838b8c7d (diff) | |
| download | godot-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.cpp | 6 |
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; |
