daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest May 20th, 2018 113 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # the data:
  2.     sub uvh_loop_get_data(Loop --> Pointer[void]) is native(&find-uvdata) { * }
  3.     sub uvh_loop_set_data(Loop,    Pointer[void]) is native(&find-uvdata) { * }
  4.    
  5.     method data() is rw {
  6.         Proxy.new(
  7.             FETCH => method () { uvh_loop_get_data(self); },
  8.             STORE => method (Pointer[void] $value) { uvh_loop_set_data(self, $value); }
  9.         );
  10.     }
  11.  
  12. # test code
  13. my $ptr = nativecast(Pointer[void], $loop);
  14. dd $ptr;
  15. $loop.data = $ptr;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top