KrkNative Struct Reference
Managed binding to a C function. More...
#include <object.h>
Inheritance diagram for KrkNative:
Public Member Functions | |
KrkNative * | krk_newNative (NativeFn function, const char *name, int type) |
Create a native function binding object. More... | |
Data Fields | |
NativeFn | function |
C function pointer. | |
const char * | name |
Name to use when repring. | |
const char * | doc |
Docstring to supply from __doc__ . | |
Data Fields inherited from KrkObj | |
uint16_t | type |
Tag indicating core type. | |
uint16_t | flags |
General object flags, mostly related to garbage collection. | |
uint32_t | hash |
Cached hash value for table keys. | |
struct KrkObj * | next |
Invasive linked list of all objects in the VM. | |
Protected Attributes | |
KrkObj | obj |
Base. | |
Detailed Description
Managed binding to a C function.
Represents a C function that has been exposed to managed code.
Member Function Documentation
◆ krk_newNative()
KrkNative * krk_newNative | ( | NativeFn | function, |
const char * | name, | ||
int | type | ||
) |
Create a native function binding object.
Converts a C function pointer into a native binding object which can then be used in the same place a function object (KrkClosure) would be used.
The documentation for this struct was generated from the following file:
- src/kuroko/object.h