RbxStu V3 Docs
  • Welcome
  • Information
    • Engine Information
      • Luau API Security
  • Stunc
    • Overview
    • Connections
    • Filesystem
      • readfile
      • writefile
      • appendfile
      • isfile
      • isfolder
      • listfiles
      • makefolder
      • delfile
      • delfolder
      • loadfile
      • dofile
  • Memory
    • getgc
    • reference_object
    • unreference_object
    • get_gc_threshold
  • Closures
    • isunhookable
    • makeunhookable
    • ishooked
    • restorefunction
    • hookfunction
    • hookmetamethod
    • isourclosure
    • iscclosure
    • islclosure
    • clonefunction
    • newcclosure
    • newlclosure
    • loadstring
Powered by GitBook
On this page
  1. Closures

islclosure

Overview of the iscclosure function.

Function Characteristics

This function is pure; it does not modify any data when called.

Function definition
function islclosure(closure: (...any) -> (...any)): boolean

High-Level Overview

Validates that the provided closure is implemented in Luau.

Low-Level Overview

The lua_iscfunction Luau C function is used, and the inverse of the return of it (!lua_iscfunction) is pushed onto the Luau stack as the result of this function.


This function can be implemented as a debug.info/getinfo query. It can also be implemented as the negation of iscclosure, as if something is a C closure, it cannot be a Luau closure, and vice versa.

PreviousiscclosureNextclonefunction

Last updated 4 months ago