Răsfoiți Sursa

no mark bits for enums (until dynamic)

Nicolas Cannasse 8 ani în urmă
părinte
comite
dbcbc6c3bf
1 a modificat fișierele cu 6 adăugiri și 1 ștergeri
  1. 6 1
      src/std/types.c

+ 6 - 1
src/std/types.c

@@ -297,7 +297,7 @@ HL_PRIM int hl_mark_size( int data_size );
 HL_PRIM void hl_init_enum( hl_type *et, hl_module_context *m ) {
 	int i, j;
 	int max_size = 0;
-	unsigned int *mark;
+	//unsigned int *mark;
 	for(i=0;i<et->tenum->nconstructs;i++) {
 		hl_enum_construct *c = et->tenum->constructs + i;
 		c->hasptr = false;
@@ -311,6 +311,10 @@ HL_PRIM void hl_init_enum( hl_type *et, hl_module_context *m ) {
 		}
 		if( c->size > max_size && c->hasptr ) max_size = c->size;
 	}
+
+	// mark bits will be only work here if enums are dynamic !
+
+	/*
 	mark = (unsigned int*)hl_zalloc(&m->alloc,hl_mark_size(max_size));
 	for(i=0;i<et->tenum->nconstructs;i++) {
 		hl_enum_construct *c = et->tenum->constructs + i;
@@ -322,6 +326,7 @@ HL_PRIM void hl_init_enum( hl_type *et, hl_module_context *m ) {
 			}
 	}
 	et->mark_bits = mark;
+	*/
 }
 
 HL_PRIM varray* hl_type_enum_fields( hl_type *t ) {