aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/FbTk/LuaUtil.cc9
-rw-r--r--src/FbTk/LuaUtil.hh1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/FbTk/LuaUtil.cc b/src/FbTk/LuaUtil.cc
index 8f382e8..a5413f2 100644
--- a/src/FbTk/LuaUtil.cc
+++ b/src/FbTk/LuaUtil.cc
@@ -132,4 +132,13 @@ void Lua::readOnlySet(int index) {
132 pop(); 132 pop();
133} 133}
134 134
135void Lua::readOnlySetField(int index, const char *k) {
136 checkstack(1);
137 index = absindex(index);
138
139 pushstring(k);
140 insert(-2);
141 readOnlySet(index);
142}
143
135} // namespace FbTk 144} // namespace FbTk
diff --git a/src/FbTk/LuaUtil.hh b/src/FbTk/LuaUtil.hh
index 12a687e..2c611ac 100644
--- a/src/FbTk/LuaUtil.hh
+++ b/src/FbTk/LuaUtil.hh
@@ -52,6 +52,7 @@ public:
52 * It can be used to modify protected entries or create new ones. 52 * It can be used to modify protected entries or create new ones.
53 */ 53 */
54 void readOnlySet(int index); 54 void readOnlySet(int index);
55 void readOnlySetField(int index, const char *k);
55 56
56 typedef Slot<void, Lua &> InitFunction; 57 typedef Slot<void, Lua &> InitFunction;
57 58