From 135c2112ad87265d35899dede34c3a7e06ec2f54 Mon Sep 17 00:00:00 2001 From: Karroffel Date: Thu, 27 Jul 2017 09:23:21 +0200 Subject: 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. --- modules/gdnative/register_types.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/gdnative') diff --git a/modules/gdnative/register_types.cpp b/modules/gdnative/register_types.cpp index 20ac1ecc0c..d180d5aada 100644 --- a/modules/gdnative/register_types.cpp +++ b/modules/gdnative/register_types.cpp @@ -47,7 +47,8 @@ godot_variant cb_standard_varcall(void *handle, godot_string *p_procedure, godot Error err = OS::get_singleton()->get_dynamic_library_symbol_handle( handle, *(String *)p_procedure, - library_proc); + library_proc, + true); // we roll our own message if (err != OK) { ERR_PRINT((String("GDNative procedure \"" + *(String *)p_procedure) + "\" does not exists and can't be called").utf8().get_data()); godot_variant ret; -- cgit v1.2.3