From cbc5431d62e3fe9166f18395dce3ddf2af0906d3 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 28 Mar 2026 21:32:23 +0000 Subject: Switch modules from reference<> to shared_ptr<> and weak_ptr<>. --- modules/regex_stdlib.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/regex_stdlib.cpp') 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()) { } -- cgit v1.3.1-10-gc9f91