Skip to content
Snippets Groups Projects
Commit 16a0c36a authored by Niels Möller's avatar Niels Möller
Browse files

Don't inherit Regexp. Changed map_regexp() accordingly.

Rev: lib/modules/Simulate.pmod:1.4
parent 6e6104ed
No related branches found
No related tags found
No related merge requests found
...@@ -5,8 +5,6 @@ inherit Process; ...@@ -5,8 +5,6 @@ inherit Process;
#define error(X) throw( ({ (X), backtrace()[0..sizeof(backtrace())-2] }) ) #define error(X) throw( ({ (X), backtrace()[0..sizeof(backtrace())-2] }) )
inherit Regexp : regexp;
varargs int member_array(mixed needle,mixed *haystack,int start) varargs int member_array(mixed needle,mixed *haystack,int start)
{ {
return search(haystack,needle,start); return search(haystack,needle,start);
...@@ -44,9 +42,8 @@ function get_function(object o, string a) ...@@ -44,9 +42,8 @@ function get_function(object o, string a)
string *map_regexp(string *s, string reg) string *map_regexp(string *s, string reg)
{ {
regexp::create(reg); object(Regexp) regexp = Regexp(reg);
s=filter(s,regexp::match); s=filter(s,regexp->match);
regexp::create(); /* Free compiled regexp */
return s; return s;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment