Browse Source

Added sizeof support for Self.

woollybah 11 years ago
parent
commit
7572b5d09b
1 changed files with 3 additions and 0 deletions
  1. 3 0
      ctranslator.bmx

+ 3 - 0
ctranslator.bmx

@@ -1127,6 +1127,9 @@ EndRem
 		Else If TIdentTypeExpr(expr.expr) Then
 			' doing something like : SizeOf TMyType
 			Return Bra(TIdentTypeExpr(expr.expr).cdecl.munged + ".instance_size-(sizeof(void*))")
+		
+		Else If TSelfExpr(expr.expr) Then
+			Return Bra("o->clas->instance_size-(sizeof(void*))")
 		End If
 		
 		InternalErr