Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global var logfunc1:shared_ptr[DLLFunc];
- global var logfunc2:shared_ptr[DLLFunc];
- function init(){
- logfunc1 = shared_ptr::new(DLLFunc::load("stdio", "_print"));
- logfunc2 = logfunc1;
- }
- function log(message:string){
- logfunc1->invoke(message.get_data());
- }
- function update_logger(func:ref DLLFunc){
- *logfunc2 = *func;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement