Advertisement
tinyevil

Untitled

Jul 29th, 2018
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. global var logfunc1:shared_ptr[DLLFunc];
  2. global var logfunc2:shared_ptr[DLLFunc];
  3.  
  4. function init(){
  5. logfunc1 = shared_ptr::new(DLLFunc::load("stdio", "_print"));
  6. logfunc2 = logfunc1;
  7. }
  8.  
  9. function log(message:string){
  10. logfunc1->invoke(message.get_data());
  11. }
  12.  
  13. function update_logger(func:ref DLLFunc){
  14. *logfunc2 = *func;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement