Mercurial Hosting > luan
changeset 491:4dc9cb26a3a8
raw_set and set_metatable now return void instead of LuanTable
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 12 May 2015 13:05:01 -0600 |
parents | ddee9f5167d8 |
children | b36cc406d3d2 |
files | core/src/luan/modules/BasicLuan.java website/src/manual.html.luan |
diffstat | 2 files changed, 2 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/core/src/luan/modules/BasicLuan.java Tue May 12 12:59:37 2015 -0600 +++ b/core/src/luan/modules/BasicLuan.java Tue May 12 13:05:01 2015 -0600 @@ -72,11 +72,10 @@ return obj!=null ? obj : metatable; } - public static LuanTable set_metatable(LuanState luan,LuanTable table,LuanTable metatable) throws LuanException { + public static void set_metatable(LuanState luan,LuanTable table,LuanTable metatable) throws LuanException { if( table.getHandler("__metatable") != null ) throw luan.exception("cannot change a protected metatable"); table.setMetatable(metatable); - return table; } public static boolean raw_equal(Object v1,Object v2) { @@ -87,9 +86,8 @@ return table.rawGet(index); } - public static LuanTable raw_set(LuanTable table,Object index,Object value) { + public static void raw_set(LuanTable table,Object index,Object value) { table.rawPut(index,value); - return table; } public static int raw_len(LuanState luan,Object v) throws LuanException {
--- a/website/src/manual.html.luan Tue May 12 12:59:37 2015 -0600 +++ b/website/src/manual.html.luan Tue May 12 13:05:01 2015 -0600 @@ -2182,9 +2182,6 @@ <tt>index</tt> any value different from <b>nil</b>, and <tt>value</tt> any Lua value. -<p> -This function returns <tt>table</tt>. - <h4 <%=heading_options%> ><a name="Luan.set_metatable"><tt>Luan.set_metatable (table, metatable)</tt></a></h4> @@ -2196,10 +2193,6 @@ raises an error. -<p> -This function returns <tt>table</tt>. - - <p>