mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-10 21:58:48 +01:00
Merge pull request #611 from iwillspeak/doc-fixup
Update Call to `WrenInterpret` in Docs
This commit is contained in:
@ -131,7 +131,9 @@ VM, waiting to run some code!
|
||||
You execute a string of Wren source code like so:
|
||||
|
||||
:::c
|
||||
WrenInterpretResult result = wrenInterpret(vm,
|
||||
WrenInterpretResult result = wrenInterpret(
|
||||
vm,
|
||||
"my_module",
|
||||
"System.print(\"I am running in a VM!\")");
|
||||
|
||||
The string is a series of one or more statements separated by newlines. Wren
|
||||
|
||||
@ -207,7 +207,7 @@ Over in the host, first we'll set up the VM:
|
||||
config.bindForeignMethodFn = bindForeignMethod;
|
||||
|
||||
WrenVM* vm = wrenNewVM(&config);
|
||||
wrenInterpret(vm, "some code...");
|
||||
wrenInterpret(vm, "my_module", "some code...");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user