mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
[ruamoko] Allow builtins to inc/dec retain count
Needed for classes that are implemented entirely in C.
This commit is contained in:
parent
8a7fbdfc9f
commit
c23c68cf7f
2 changed files with 20 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue