1.1 --- a/templates/progops.c Tue Mar 21 01:15:38 2017 +0100
1.2 +++ b/templates/progops.c Tue Mar 21 18:45:42 2017 +0100
1.3 @@ -27,9 +27,9 @@
1.4
1.5 /* Generic instantiation operations, defining common members. */
1.6
1.7 -__attr __new(const __table * table, __ref cls, size_t size)
1.8 +__attr __new(const __table * table, __ref cls, size_t size, int immutable)
1.9 {
1.10 - __ref obj = (__ref) __ALLOCATE(1, size);
1.11 + __ref obj = (__ref) (immutable ? __ALLOCATEIM : __ALLOCATE)(1, size);
1.12 obj->table = table;
1.13 obj->pos = __INSTANCEPOS;
1.14 __store_via_object(obj, __class__, (__attr) {.value=cls});