mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Merge branch 'master' into merge
This commit is contained in:
commit
305f255a1f
2 changed files with 6 additions and 1 deletions
|
@ -77,6 +77,11 @@
|
||||||
if (LUAU_UNLIKELY(!!interrupt)) \
|
if (LUAU_UNLIKELY(!!interrupt)) \
|
||||||
{ /* the interrupt hook is called right before we advance pc */ \
|
{ /* the interrupt hook is called right before we advance pc */ \
|
||||||
VM_PROTECT(L->ci->savedpc++; interrupt(L, -1)); \
|
VM_PROTECT(L->ci->savedpc++; interrupt(L, -1)); \
|
||||||
|
if (L->status != 0) \
|
||||||
|
{ \
|
||||||
|
L->ci->savedpc--; \
|
||||||
|
goto exit; \
|
||||||
|
} \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -128,7 +128,7 @@ Returns the type of the object, which is one of `"nil"`, `"boolean"`, `"number"`
|
||||||
function typeof(obj: any): string
|
function typeof(obj: any): string
|
||||||
```
|
```
|
||||||
|
|
||||||
Returns the type of the object; for userdata objects that have a metatable with the `__type` field *and* are defined by the host with an internal tag, returns the value for that key.
|
Returns the type of the object; for userdata objects that have a metatable with the `__type` field *and* are defined by the host (not `newproxy`), returns the value for that key.
|
||||||
For custom userdata objects, such as ones returned by `newproxy`, this function returns `"userdata"` to make sure host-defined types can not be spoofed.
|
For custom userdata objects, such as ones returned by `newproxy`, this function returns `"userdata"` to make sure host-defined types can not be spoofed.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Reference in a new issue