Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :- pragma foreign_decl("C", "
- void * luaMR_new(void *);
- void luaMR_free(void *);
- ").
- :- pragma foreign_code("C", "
- MR_Word * luaMR_new(MR_Word word) {
- MR_Word * newptr = MR_GC_NEW_UNCOLLECTABLE(sizeof(MR_Word *));
- newptr = &word;
- return newptr;
- }
- void luaMR_free(void * ptr) {
- MR_GC_FREE(*ptr);
- }
- ").
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement