diff options
Diffstat (limited to 'modules/regex')
-rw-r--r-- | modules/regex/config.py | 2 | ||||
-rw-r--r-- | modules/regex/doc_classes/RegEx.xml | 2 | ||||
-rw-r--r-- | modules/regex/doc_classes/RegExMatch.xml | 2 | ||||
-rw-r--r-- | modules/regex/regex.cpp | 4 | ||||
-rw-r--r-- | modules/regex/regex.h | 6 | ||||
-rw-r--r-- | modules/regex/register_types.cpp | 15 | ||||
-rw-r--r-- | modules/regex/register_types.h | 10 | ||||
-rw-r--r-- | modules/regex/tests/test_regex.h | 4 |
8 files changed, 27 insertions, 18 deletions
diff --git a/modules/regex/config.py b/modules/regex/config.py index df9f44cb95..1248a8374d 100644 --- a/modules/regex/config.py +++ b/modules/regex/config.py @@ -1,5 +1,5 @@ def can_build(env, platform): - return True + return not env["arch"].startswith("rv") def configure(env): diff --git a/modules/regex/doc_classes/RegEx.xml b/modules/regex/doc_classes/RegEx.xml index 2ae2e53b02..deabc5ccd3 100644 --- a/modules/regex/doc_classes/RegEx.xml +++ b/modules/regex/doc_classes/RegEx.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="RegEx" inherits="RefCounted" version="4.0"> +<class name="RegEx" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> <brief_description> Class for searching text for patterns using regular expressions. </brief_description> diff --git a/modules/regex/doc_classes/RegExMatch.xml b/modules/regex/doc_classes/RegExMatch.xml index 20680b41fd..530a541ae8 100644 --- a/modules/regex/doc_classes/RegExMatch.xml +++ b/modules/regex/doc_classes/RegExMatch.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="RegExMatch" inherits="RefCounted" version="4.0"> +<class name="RegExMatch" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> <brief_description> Contains the results of a [RegEx] search. </brief_description> diff --git a/modules/regex/regex.cpp b/modules/regex/regex.cpp index 6bae12e7e6..ee1137b71f 100644 --- a/modules/regex/regex.cpp +++ b/modules/regex/regex.cpp @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/modules/regex/regex.h b/modules/regex/regex.h index 68fe2bc6e0..e7221f4070 100644 --- a/modules/regex/regex.h +++ b/modules/regex/regex.h @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -71,7 +71,7 @@ public: class RegEx : public RefCounted { GDCLASS(RegEx, RefCounted); - void *general_ctx; + void *general_ctx = nullptr; void *code = nullptr; String pattern; diff --git a/modules/regex/register_types.cpp b/modules/regex/register_types.cpp index 03957f88cf..2103c57f77 100644 --- a/modules/regex/register_types.cpp +++ b/modules/regex/register_types.cpp @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -32,10 +32,17 @@ #include "core/object/class_db.h" #include "regex.h" -void register_regex_types() { +void initialize_regex_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } + GDREGISTER_CLASS(RegExMatch); GDREGISTER_CLASS(RegEx); } -void unregister_regex_types() { +void uninitialize_regex_module(ModuleInitializationLevel p_level) { + if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) { + return; + } } diff --git a/modules/regex/register_types.h b/modules/regex/register_types.h index fe94cde954..c3edf23562 100644 --- a/modules/regex/register_types.h +++ b/modules/regex/register_types.h @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -31,7 +31,9 @@ #ifndef REGEX_REGISTER_TYPES_H #define REGEX_REGISTER_TYPES_H -void register_regex_types(); -void unregister_regex_types(); +#include "modules/register_module_types.h" + +void initialize_regex_module(ModuleInitializationLevel p_level); +void uninitialize_regex_module(ModuleInitializationLevel p_level); #endif // REGEX_REGISTER_TYPES_H diff --git a/modules/regex/tests/test_regex.h b/modules/regex/tests/test_regex.h index c2d303b435..3f500e7b2f 100644 --- a/modules/regex/tests/test_regex.h +++ b/modules/regex/tests/test_regex.h @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ |