Преглед на файлове

Do not use naked 'this' pointers - should simplify things

Hugh Sanderson преди 14 години
родител
ревизия
335f2d42db
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      gencpp.ml

+ 2 - 2
gencpp.ml

@@ -1256,8 +1256,8 @@ and gen_expression ctx retval expression =
 		| TBool b -> output (if b then "true" else "false")
 		(*| TNull -> output ("((" ^ (type_string expression.etype) ^ ")null())")*)
 		| TNull -> output "null()"
-		| TThis -> output (if ctx.ctx_real_this_ptr then "this" else "__this")
-		| TSuper -> output (if ctx.ctx_real_this_ptr then "((super *)this)" else "((super*)__this)")
+		| TThis -> output (if ctx.ctx_real_this_ptr then "hx::ObjectPtr<OBJ_>(this)" else "__this")
+		| TSuper -> output ("hx::ObjectPtr<super>(" ^ (if ctx.ctx_real_this_ptr then "this" else "__this.mPtr") ^ ")")
 		)