blueloveTH %!s(int64=2) %!d(string=hai) anos
pai
achega
62a66339c5
Modificáronse 1 ficheiros con 11 adicións e 0 borrados
  1. 11 0
      docs/quick-start/installation.md

+ 11 - 0
docs/quick-start/installation.md

@@ -65,4 +65,15 @@ When you are done with the `VM` instance, use `delete` operator to dispose it.
 
 ```cpp
 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&);
 ```