mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
Update using-toy.md
This commit is contained in:
@@ -47,7 +47,7 @@ Toy_freeInterpreter(&interpreter);
|
|||||||
In addition to this, you might also wish to "inject" a series of usable libraries into the interpreter, which can be `import`-ed within the language itself. This process only needs to be done once, after initialization, but before the first run.
|
In addition to this, you might also wish to "inject" a series of usable libraries into the interpreter, which can be `import`-ed within the language itself. This process only needs to be done once, after initialization, but before the first run.
|
||||||
|
|
||||||
```c
|
```c
|
||||||
Toy_injectNativeHook(&interpreter, "standard", hookStandard);
|
Toy_injectNativeHook(&interpreter, "standard", Toy_hookStandard);
|
||||||
```
|
```
|
||||||
|
|
||||||
A "hook" is a callback function which is invoked when the given library is imported. `standard` is the most commonly used library available.
|
A "hook" is a callback function which is invoked when the given library is imported. `standard` is the most commonly used library available.
|
||||||
|
|||||||
Reference in New Issue
Block a user