diff --git a/include/QF/ruamoko.h b/include/QF/ruamoko.h index a2dcd6366..956465268 100644 --- a/include/QF/ruamoko.h +++ b/include/QF/ruamoko.h @@ -31,7 +31,7 @@ #ifndef __QF_ruamoko_h #define __QF_ruamoko_h -#include "QF/pr_comp.h" +#include "QF/pr_obj.h" struct progs_s; struct cbuf_s; @@ -40,4 +40,9 @@ void RUA_Init (struct progs_s *pr, int secure); void RUA_Cbuf_SetCbuf (struct progs_s *pr, struct cbuf_s *cbuf); func_t RUA_Obj_msg_lookup (struct progs_s *pr, pointer_t _self, pointer_t __cmd); +// self is expected in param 0 +int RUA_obj_increment_retaincount (struct progs_s *pr); +// self is expected in param 0 +int RUA_obj_decrement_retaincount (struct progs_s *pr); + #endif//__QF_ruamoko_h diff --git a/libs/ruamoko/rua_obj.c b/libs/ruamoko/rua_obj.c index 1cdf8ed86..5bd5e3871 100644 --- a/libs/ruamoko/rua_obj.c +++ b/libs/ruamoko/rua_obj.c @@ -2254,3 +2254,17 @@ RUA_Obj_msg_lookup (progs_t *pr, pointer_t _self, pointer_t __cmd) return imp; } + +int +RUA_obj_increment_retaincount (progs_t *pr) +{ + rua_obj_increment_retaincount (pr); + return R_INT (pr); +} + +int +RUA_obj_decrement_retaincount (progs_t *pr) +{ + rua_obj_decrement_retaincount (pr); + return R_INT (pr); +}