# HG changeset patch # User Paul Boddie # Date 1488903627 -3600 # Node ID 10750eb0e8b822cca02ff47f7f7388629d51bd6a # Parent 6a264fb5a3670d91f52d63219c9ff6ca38c86ab9# Parent 374ccaa7be71efc510fca4dd22a48edb1c0d1719 Merged changes from the default branch. diff -r 6a264fb5a367 -r 10750eb0e8b8 generator.py --- a/generator.py Tue Mar 07 00:28:18 2017 +0100 +++ b/generator.py Tue Mar 07 17:20:27 2017 +0100 @@ -497,6 +497,8 @@ try: if debug: print >>f_options, "CFLAGS = -g" + else: + print >>f_options, "CFLAGS = -O2" if gc_sections: print >>f_options, "include gc_sections.mk" diff -r 6a264fb5a367 -r 10750eb0e8b8 lib/__builtins__/buffer.py --- a/lib/__builtins__/buffer.py Tue Mar 07 00:28:18 2017 +0100 +++ b/lib/__builtins__/buffer.py Tue Mar 07 17:20:27 2017 +0100 @@ -3,7 +3,7 @@ """ Buffer object. -Copyright (C) 2015, 2016 Paul Boddie +Copyright (C) 2015, 2016, 2017 Paul Boddie This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -34,7 +34,7 @@ elif isinstance(size, int): n = size else: - raise TypeError(size) + raise ValueError(size) self.__data__ = list_init(n) diff -r 6a264fb5a367 -r 10750eb0e8b8 lib/__builtins__/tuple.py --- a/lib/__builtins__/tuple.py Tue Mar 07 00:28:18 2017 +0100 +++ b/lib/__builtins__/tuple.py Tue Mar 07 17:20:27 2017 +0100 @@ -3,7 +3,7 @@ """ Tuple objects. -Copyright (C) 2015, 2016 Paul Boddie +Copyright (C) 2015, 2016, 2017 Paul Boddie This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -103,6 +103,6 @@ "Set at the normalised (positive) 'index' the given 'value'." - raise TypeError(self) + raise TypeError # vim: tabstop=4 expandtab shiftwidth=4 diff -r 6a264fb5a367 -r 10750eb0e8b8 templates/Makefile --- a/templates/Makefile Tue Mar 07 00:28:18 2017 +0100 +++ b/templates/Makefile Tue Mar 07 17:20:27 2017 +0100 @@ -4,7 +4,7 @@ SRC += calls.c exceptions.c main.c ops.c progops.c progtypes.c OBJ = $(SRC:.c=.o) -CFLAGS += -Wall -I. -finput-charset=UTF-8 -O2 +CFLAGS += -Wall -I. -finput-charset=UTF-8 LDFLAGS += -lm -lgc ifdef ARCH diff -r 6a264fb5a367 -r 10750eb0e8b8 translator.py --- a/translator.py Tue Mar 07 00:28:18 2017 +0100 +++ b/translator.py Tue Mar 07 17:20:27 2017 +0100 @@ -1112,7 +1112,7 @@ # Complete the array with null values, permitting tests for a complete # set of arguments. - args += [None] * (not parameters and len(n.args) or parameters and len(parameters) or 0) + args += [None] * (parameters is None and len(n.args) or parameters is not None and len(parameters) or 0) kwcodes = [] kwargs = []