1.1 --- a/templates/progops.h Sat Mar 25 23:06:55 2017 +0100
1.2 +++ b/templates/progops.h Sat Mar 25 23:20:16 2017 +0100
1.3 @@ -32,10 +32,11 @@
1.4
1.5 __fragment *__new_fragment(unsigned int n);
1.6
1.7 -__attr __newdata_sequence(__attr self, __attr args[], unsigned int number);
1.8 +__attr __newdata_list(__attr args[], unsigned int number);
1.9 +__attr __newdata_tuple(__attr args[], unsigned int number);
1.10
1.11 #ifdef __HAVE___builtins___dict_dict
1.12 -__attr __newdata_mapping(__attr self, __attr args[], unsigned int number);
1.13 +__attr __newdata_dict(__attr args[], unsigned int number);
1.14 #endif /* __HAVE___builtins___dict_dict */
1.15
1.16 /* Helpers for raising errors within common operations. */
1.17 @@ -78,8 +79,10 @@
1.18
1.19 /* Convenience definitions. */
1.20
1.21 -#define __NEWINSTANCE(__CLS) __new(&__InstanceTable_##__CLS, &__CLS, sizeof(__obj_##__CLS), 0)
1.22 -#define __NEWINSTANCEIM(__CLS) __new(&__InstanceTable_##__CLS, &__CLS, sizeof(__obj_##__CLS), 1)
1.23 -#define __ISINSTANCE(__ATTR, __TYPE) __BOOL(__fn_native_introspection_isinstance(__NULL, __ATTR, __TYPE))
1.24 +#define __INSTANCESIZE(CLS) sizeof(__obj_##CLS)
1.25 +#define __INSTANCETABLE(CLS) (__InstanceTable_##CLS)
1.26 +#define __NEWINSTANCE(CLS) __new(&__INSTANCETABLE(CLS), &CLS, __INSTANCESIZE(CLS), 0)
1.27 +#define __NEWINSTANCEIM(CLS) __new(&__INSTANCETABLE(CLS), &CLS, __INSTANCESIZE(CLS), 1)
1.28 +#define __ISINSTANCE(ATTR, TYPE) __BOOL(__fn_native_introspection_isinstance(__NULL, ATTR, TYPE))
1.29
1.30 #endif /* __PROGOPS_H__ */