aboutsummaryrefslogtreecommitdiff
path: root/modules/regex_stdlib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/regex_stdlib.cpp')
-rw-r--r--modules/regex_stdlib.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/regex_stdlib.cpp b/modules/regex_stdlib.cpp
index 427c0a34b..384453d21 100644
--- a/modules/regex_stdlib.cpp
+++ b/modules/regex_stdlib.cpp
@@ -31,7 +31,7 @@ private:
std::regex regex;
public:
- StdLibPattern(const Module* mod, const std::string& pattern, uint8_t options, std::regex::flag_type type)
+ StdLibPattern(const WeakModulePtr& mod, const std::string& pattern, uint8_t options, std::regex::flag_type type)
: Regex::Pattern(pattern, options)
{
// Convert the generic pattern options to stdlib pattern flags.
@@ -77,7 +77,7 @@ class StdLibEngine final
public:
std::regex::flag_type regextype;
- StdLibEngine(Module* Creator)
+ StdLibEngine(const WeakModulePtr& Creator)
: Regex::Engine(Creator, "stdregex")
{
}
@@ -97,7 +97,7 @@ private:
public:
ModuleRegexStdLib()
: Module(VF_VENDOR, "Provides the stdregex regular expression engine which uses the C++11 std::regex regular expression matching system.")
- , regex(this)
+ , regex(weak_from_this())
{
}