Quirrel4.41.0

types.UserData.is_frozen

Method on every userdata
is_frozen(): any

Reports whether this userdata was frozen with freeze().

Return value

true if the userdata is immutable, false otherwise.

Errors

Not reachable from plain script: Quirrel gives script code no way to create a userdata value, so there is never one to call this on.

Notes

Takes no arguments. Registered with a receiver check of . (matches any type), the same as types.Table.is_frozen, so unlike getfuncinfos it does not fall into the delegate-table lookup trap described there - any this passes the check, whichever type's default method answers it.

// Illustration only - ud is not obtainable from plain script.
println(ud.is_frozen())

See also

cloneAlways throws.
getfuncinfosIf the userdata has a delegate providing a _call metamethod, returns introspection info about that metamethod's closure; otherwise returns null.
is_frozenReports whether this reference to the table was frozen with freeze().
userdataclass index