1.1 --- a/templates/progops.c Tue Dec 06 15:12:04 2016 +0100
1.2 +++ b/templates/progops.c Tue Dec 06 17:49:39 2016 +0100
1.3 @@ -58,7 +58,6 @@
1.4 }
1.5
1.6 #ifdef __HAVE___builtins___dict_dict
1.7 -
1.8 void __newdata_mapping(__attr args[], unsigned int number)
1.9 {
1.10 __attr dict = args[0];
1.11 @@ -76,36 +75,44 @@
1.12 __fn___builtins___dict_dict___init__(callargs);
1.13 args[0] = dict;
1.14 }
1.15 -
1.16 #endif /* __HAVE___builtins___dict_dict */
1.17
1.18 /* Helpers for raising errors within common operations. */
1.19
1.20 +#ifdef __HAVE___builtins___exception_io_IOError
1.21 +void __raise_io_error()
1.22 +{
1.23 + __attr args[1];
1.24 + __attr exc = __new___builtins___exception_io_IOError(args);
1.25 + __Raise(exc);
1.26 +}
1.27 +#endif /* __HAVE___builtins___exception_io_IOError */
1.28 +
1.29 void __raise_memory_error()
1.30 {
1.31 __attr args[1];
1.32 - __attr exc = __MEMORY_ERROR_INSTANTIATOR(args);
1.33 + __attr exc = __new___builtins___core_MemoryError(args);
1.34 __Raise(exc);
1.35 }
1.36
1.37 void __raise_overflow_error()
1.38 {
1.39 __attr args[1];
1.40 - __attr exc = __OVERFLOW_ERROR_INSTANTIATOR(args);
1.41 + __attr exc = __new___builtins___core_OverflowError(args);
1.42 __Raise(exc);
1.43 }
1.44
1.45 void __raise_type_error()
1.46 {
1.47 __attr args[1];
1.48 - __attr exc = __TYPE_ERROR_INSTANTIATOR(args);
1.49 + __attr exc = __new___builtins___core_TypeError(args);
1.50 __Raise(exc);
1.51 }
1.52
1.53 void __raise_zero_division_error()
1.54 {
1.55 __attr args[1];
1.56 - __attr exc = __ZERO_DIVISION_ERROR_INSTANTIATOR(args);
1.57 + __attr exc = __new___builtins___core_ZeroDivisionError(args);
1.58 __Raise(exc);
1.59 }
1.60