aboutsummaryrefslogtreecommitdiffstats
path: root/interpret.h
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2019-01-08 21:15:18 +0200
committerArnold D. Robbins <arnold@skeeve.com>2019-01-08 21:15:18 +0200
commit212e063404fa8bf876f9412318f4677cfd6f93db (patch)
treee07c256fda52992b80ddf6eaa253832764c85418 /interpret.h
parentf8f8129b0cf19bd3a001d9421c35aa3dd818d6d8 (diff)
downloadegawk-212e063404fa8bf876f9412318f4677cfd6f93db.tar.gz
egawk-212e063404fa8bf876f9412318f4677cfd6f93db.tar.bz2
egawk-212e063404fa8bf876f9412318f4677cfd6f93db.zip
Small optimization for translatable strings.
Diffstat (limited to 'interpret.h')
-rw-r--r--interpret.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/interpret.h b/interpret.h
index 4381a929..2934c5c0 100644
--- a/interpret.h
+++ b/interpret.h
@@ -156,7 +156,10 @@ top:
orig = m->stptr;
trans = dgettext(TEXTDOMAIN, orig);
m->stptr[m->stlen] = save;
- m = make_string(trans, strlen(trans));
+ if (trans != orig) // got a translation
+ m = make_string(trans, strlen(trans));
+ else
+ UPREF(m);
} else
UPREF(m);
PUSH(m);