mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
...
This commit is contained in:
parent
4ec90dc5c6
commit
62a66339c5
@ -66,3 +66,14 @@ When you are done with the `VM` instance, use `delete` operator to dispose it.
|
|||||||
```cpp
|
```cpp
|
||||||
delete vm;
|
delete vm;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Hook standard buffer
|
||||||
|
|
||||||
|
By default, pkpy outputs all messages and errors to `stdout` and `stderr`.
|
||||||
|
You can redirect them to your own buffer by setting `vm->_stdout` and `vm->_stderr`.
|
||||||
|
|
||||||
|
These two fields are C function pointers `PrintFunc` with the following signature:
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
typedef void(*PrintFunc)(VM*, const Str&);
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user