1.1 --- a/templates/progops.c Sat Dec 03 16:26:03 2016 +0100
1.2 +++ b/templates/progops.c Sat Dec 03 16:44:55 2016 +0100
1.3 @@ -79,7 +79,21 @@
1.4
1.5 #endif /* __HAVE___builtins___dict_dict */
1.6
1.7 -/* A helper for raising type errors within common operations. */
1.8 +/* Helpers for raising errors within common operations. */
1.9 +
1.10 +void __raise_memory_error()
1.11 +{
1.12 + __attr args[1];
1.13 + __attr exc = __MEMORY_ERROR_INSTANTIATOR(args);
1.14 + __Raise(exc);
1.15 +}
1.16 +
1.17 +void __raise_overflow_error()
1.18 +{
1.19 + __attr args[1];
1.20 + __attr exc = __OVERFLOW_ERROR_INSTANTIATOR(args);
1.21 + __Raise(exc);
1.22 +}
1.23
1.24 void __raise_type_error()
1.25 {
1.26 @@ -88,12 +102,10 @@
1.27 __Raise(exc);
1.28 }
1.29
1.30 -/* A helper for raising memory errors within common operations. */
1.31 -
1.32 -void __raise_memory_error()
1.33 +void __raise_zero_division_error()
1.34 {
1.35 __attr args[1];
1.36 - __attr exc = __MEMORY_ERROR_INSTANTIATOR(args);
1.37 + __attr exc = __ZERO_DIVISION_ERROR_INSTANTIATOR(args);
1.38 __Raise(exc);
1.39 }
1.40