Mercurial Hosting > luan
changeset 513:0dfc01d8d42d
rename type "userdata" to "java"
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 24 May 2015 12:05:00 -0600 |
parents | d96944467ffc |
children | 7d1afc73f835 |
files | core/src/luan/Luan.java website/src/diff.html.luan website/src/manual.html.luan |
diffstat | 3 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
diff -r d96944467ffc -r 0dfc01d8d42d core/src/luan/Luan.java --- a/core/src/luan/Luan.java Fri May 22 16:08:23 2015 -0600 +++ b/core/src/luan/Luan.java Sun May 24 12:05:00 2015 -0600 @@ -38,7 +38,7 @@ return "function"; if( obj instanceof byte[] ) return "binary"; - return "userdata"; + return "java"; } public static String toString(Number n) {
diff -r d96944467ffc -r 0dfc01d8d42d website/src/diff.html.luan --- a/website/src/diff.html.luan Fri May 22 16:08:23 2015 -0600 +++ b/website/src/diff.html.luan Sun May 24 12:05:00 2015 -0600 @@ -86,7 +86,7 @@ <p>Luan functions may be written in Luan or may be wrappers around native Java methods. Any Java method may be called as a Luan function.</p> -<p>Luan <i>userdata</i> is nothing more than a Java object that doesn't fall into one of the other recognized types.</p> +<p>The Luan <i>java</i> type is a replacement for Lua's <i>userdata</i>. A Luan <i>java</i> value is nothing more than a Java object that doesn't fall into one of the other recognized types.</p> <p>The Luan <i>binary</i> type is the Java <i>byte[ ]</i> type which is an array of bytes.</p>
diff -r d96944467ffc -r 0dfc01d8d42d website/src/manual.html.luan --- a/website/src/manual.html.luan Fri May 22 16:08:23 2015 -0600 +++ b/website/src/manual.html.luan Sun May 24 12:05:00 2015 -0600 @@ -129,7 +129,7 @@ <p> There are eight basic types in Luan: <i>nil</i>, <i>boolean</i>, <i>number</i>, -<i>string</i>, <i>binary</i>, <i>function</i>, <i>userdata</i>, +<i>string</i>, <i>binary</i>, <i>function</i>, <i>java</i>, and <i>table</i>. <i>Nil</i> is the type of the value <b>nil</b>, whose main property is to be different from any other value; @@ -153,12 +153,12 @@ <p> -The type <i>userdata</i> is provided to allow arbitrary Java objects to +The type <i>java</i> is provided to allow arbitrary Java objects to be stored in Luan variables. -A userdata value is a Java object that isn't one of the standard Luan types. -Userdata has no predefined operations in Luan, +A <i>java</i> value is a Java object that isn't one of the standard Luan types. +Java values have no predefined operations in Luan, except assignment and identity test. -Userdata is useful then Java access is enabled in Luan +Java values are useful when Java access is enabled in Luan @@ -1267,7 +1267,7 @@ by using the "eq" metamethod (see <a href="#meta">Metatables and Metamethods</a>). <p> -Userdata are Java objects. They are compared for equality with the Java <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html#equals(java.lang.Object)"><tt>equals</tt></a> method. +Java values are compared for equality with the Java <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html#equals(java.lang.Object)"><tt>equals</tt></a> method. <p> Equality comparisons do not convert strings to numbers @@ -2260,7 +2260,7 @@ "<tt>boolean</tt>", "<tt>table</tt>", "<tt>function</tt>", -and "<tt>userdata</tt>". +and "<tt>java</tt>". <h4 <%=heading_options%> ><a name="Luan.values"><tt>Luan.values (···)</tt></a></h4>