lua-users home
lua-l archive

newproxy has its uses...

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> x = newproxy(true)
> = x
userdata: 005CAE68
> = rawget(x,"test")
stdin:1: bad argument #1 to 'rawget' (table expected, got userdata)
stack traceback:
 [C]: in function 'rawget'
 stdin:1: in main chunk
 [C]: ?
> = rawset(x,"test", "test")
stdin:1: bad argument #1 to 'rawset' (table expected, got userdata)
stack traceback:
 [C]: in function 'rawset'
 stdin:1: in main chunk
 [C]: ?
> = getmetatable(x)
table: 005CD330
>
======================================
So can we get newproxy back? (or __rawset/__rawget metafields or something)

AltStyle によって変換されたページ (->オリジナル) /