839 posts
Location
England
Posted 04 November 2012 - 04:59 AM
When one uses the tostring function on a table or function, does the hexadecimal code that follows 'table: ' or 'function: ' represent the memory address of the table/function, or is it merely a hash?
351 posts
Posted 04 November 2012 - 07:37 AM
If it is a memory location, it is merely an implementation detail. The number is only a unique ID according to the spec.
Why are you curious about this?
839 posts
Location
England
Posted 04 November 2012 - 02:10 PM
Just wondering out of interest, it would be useful to know for a project I'm working on.
2217 posts
Location
3232235883
Posted 04 November 2012 - 02:18 PM
you mean using cheat engine, right? :D/>/>
839 posts
Location
England
Posted 04 November 2012 - 02:56 PM
I have no clue what that would even be.
351 posts
Posted 05 November 2012 - 07:25 AM
I know it is the memory location in the standard C implementation of Lua, but I dunno about JLua… it runs on the JVM, which could seriously obscure some lower level stuff like that.
839 posts
Location
England
Posted 05 November 2012 - 11:35 AM
I would assume it's the same, but Java likes to be different from the C-likes, so it's always possible it's something else.
2447 posts
Posted 06 November 2012 - 12:17 AM
Best way to find out is to look at the LuaJ Docs/Code.