diff options
Diffstat (limited to 'modules/regex')
-rw-r--r-- | modules/regex/config.py | 2 | ||||
-rw-r--r-- | modules/regex/regex.cpp | 5 | ||||
-rw-r--r-- | modules/regex/regex.h | 2 | ||||
-rw-r--r-- | modules/regex/register_types.cpp | 4 | ||||
-rw-r--r-- | modules/regex/tests/test_regex.h | 3 |
5 files changed, 11 insertions, 5 deletions
diff --git a/modules/regex/config.py b/modules/regex/config.py index 1248a8374d..df9f44cb95 100644 --- a/modules/regex/config.py +++ b/modules/regex/config.py @@ -1,5 +1,5 @@ def can_build(env, platform): - return not env["arch"].startswith("rv") + return True def configure(env): diff --git a/modules/regex/regex.cpp b/modules/regex/regex.cpp index 999a61e11a..704c107f20 100644 --- a/modules/regex/regex.cpp +++ b/modules/regex/regex.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "regex.h" + #include "core/os/memory.h" extern "C" { @@ -40,7 +41,9 @@ static void *_regex_malloc(PCRE2_SIZE size, void *user) { } static void _regex_free(void *ptr, void *user) { - memfree(ptr); + if (ptr) { + memfree(ptr); + } } int RegExMatch::_find(const Variant &p_name) const { diff --git a/modules/regex/regex.h b/modules/regex/regex.h index 2ed20c9b14..13476d69de 100644 --- a/modules/regex/regex.h +++ b/modules/regex/regex.h @@ -33,7 +33,7 @@ #include "core/object/ref_counted.h" #include "core/string/ustring.h" -#include "core/templates/rb_map.h" +#include "core/templates/hash_map.h" #include "core/templates/vector.h" #include "core/variant/array.h" #include "core/variant/dictionary.h" diff --git a/modules/regex/register_types.cpp b/modules/regex/register_types.cpp index 715e98a79a..9e3a296ce3 100644 --- a/modules/regex/register_types.cpp +++ b/modules/regex/register_types.cpp @@ -29,9 +29,11 @@ /**************************************************************************/ #include "register_types.h" -#include "core/object/class_db.h" + #include "regex.h" +#include "core/object/class_db.h" + void initialize_regex_module(ModuleInitializationLevel p_level) { if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { return; diff --git a/modules/regex/tests/test_regex.h b/modules/regex/tests/test_regex.h index ac6192e373..6515d5d130 100644 --- a/modules/regex/tests/test_regex.h +++ b/modules/regex/tests/test_regex.h @@ -31,8 +31,9 @@ #ifndef TEST_REGEX_H #define TEST_REGEX_H +#include "../regex.h" + #include "core/string/ustring.h" -#include "modules/regex/regex.h" #include "tests/test_macros.h" |