Skip to content
Snippets Groups Projects
Commit ecfe6895 authored by Martin Stjernholm's avatar Martin Stjernholm
Browse files

Use inner functions instead of lambdas in get_object to avoid cyclic refs

between frames.

Rev: lib/modules/Locale.pmod/module.pmod:1.15
parent a2512c84
No related branches found
No related tags found
No related merge requests found
...@@ -295,7 +295,7 @@ object get_object(string project, string lang) { ...@@ -295,7 +295,7 @@ object get_object(string project, string lang) {
data = line+data; data = line+data;
string|int id; string|int id;
function str_tag = lambda(string t, mapping m, string c) { string str_tag(string t, mapping m, string c) {
id = 0; id = 0;
if(m->id && m->id!="" && c!="") { if(m->id && m->id!="" && c!="") {
if((int)m->id) m->id = (int)m->id; if((int)m->id) m->id = (int)m->id;
...@@ -304,7 +304,7 @@ object get_object(string project, string lang) { ...@@ -304,7 +304,7 @@ object get_object(string project, string lang) {
} }
return 0; return 0;
}; };
function t_tag = lambda(string t, mapping m, string c) { string t_tag(string t, mapping m, string c) {
if(!id) { if(!id) {
if(!m->id) if(!m->id)
return 0; return 0;
...@@ -323,7 +323,7 @@ object get_object(string project, string lang) { ...@@ -323,7 +323,7 @@ object get_object(string project, string lang) {
bindings[id]=c; bindings[id]=c;
return 0; return 0;
}; };
function pike_tag = lambda(string t, mapping m, string c) { string pike_tag(string t, mapping m, string c) {
// Replace encoded entities // Replace encoded entities
c = replace(c, ({"<",">","&"}), c = replace(c, ({"<",">","&"}),
({ "<", ">", "&" })); ({ "<", ">", "&" }));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment