浏览代码

Added Varptr fudge for heap objects.

Mark Sibly 8 年之前
父节点
当前提交
ae054c1d0d
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      modules/monkey/native/bbgc.h

+ 4 - 2
modules/monkey/native/bbgc.h

@@ -260,12 +260,14 @@ template<class T> struct bbGCVar{
 	operator T*()const{
 		return _ptr;
 	}
+	
+	T **operator&(){
+		return &_ptr;
+	}
 };
 
 template<class T> void bbGCMark( T const& ){
 }
-//inline void bbGCMark(...){
-//}
 
 template<class T> void bbGCMark( const bbGCVar<T> &v ){
 	bbGCMark( v._ptr );