summaryrefslogtreecommitdiff
path: root/py/argcheck.c
AgeCommit message (Collapse)Author
2017-08-13all: Raise exceptions via mp_raise_XXXJavier Candeira
- Changed: ValueError, TypeError, NotImplementedError - OSError invocations unchanged, because the corresponding utility function takes ints, not strings like the long form invocation. - OverflowError, IndexError and RuntimeError etc. not changed for now until we decide whether to add new utility functions.
2017-07-31all: Use the name MicroPython consistently in commentsAlexander Steffen
There were several different spellings of MicroPython present in comments, when there should be only one.
2017-03-28py: Use mp_raise_TypeError/mp_raise_ValueError helpers where possible.Damien George
Saves 168 bytes on bare-arm.
2016-10-17py: Use mp_raise_msg helper function where appropriate.Damien George
Saves the following number of bytes of code space: 176 for bare-arm, 352 for minimal, 272 for unix x86-64, 140 for stmhal, 120 for esp8266.
2016-09-30py/argcheck: Simplify if-chain so that the last one is the default.Damien George
2016-03-14py/argcheck: Use size_t instead of mp_uint_t to count number of args.Damien George
2015-09-03py: Use mp_not_implemented consistently for not implemented features.Damien George
2015-04-16py: Add %q format support to mp_[v]printf, and use it.Damien George
2015-01-20py, unix, stmhal: Allow to compile with -Wshadow.Damien George
See issue #699.
2015-01-02msvc: Fix unresolved mp_arg_error_terse_mismatch since 7f23384stijn
The compiler treats `if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE)` as a normal statement and generates assembly for it in degug mode as if MICROPY_ERROR_REPORTING is an actual symbol instead of a preprocessor definition. As such linking fails because mp_arg_error_terse_mismatch is not defined when MICROPY_ERROR_REPORTING_TERSE is detailed or normal.
2015-01-01py: Move to guarded includes, everywhere in py/ core.Damien George
Addresses issue #1022.
2015-01-01py: Make terse_arg_mismatch a global function and use it elsewhere.Damien George
Reduces code size when MICROPY_ERROR_REPORTING_TERSE is selected.
2014-11-06py: Use shorter, static error msgs when ERROR_REPORTING_TERSE enabled.Damien George
Going from MICROPY_ERROR_REPORTING_NORMAL to MICROPY_ERROR_REPORTING_TERSE now saves 2020 bytes ROM for ARM Thumb2, and 2200 bytes ROM for 32-bit x86. This is about a 2.5% code size reduction for bare-arm.
2014-08-30py: Change uint to mp_uint_t in runtime.h, stackctrl.h, binary.h.Damien George
Part of code cleanup, working towards resolving issue #50.
2014-05-06Merge branch 'master' of https://github.com/micropython/micropythonDamien George
Conflicts: py/argcheck.c py/objenumerate.c py/runtime.h
2014-05-06py: Add keyword arg support to enumerate constructor.Damien George
Need to have a policy as to how far we go adding keyword support to built ins. It's nice to have, and gets better CPython compatibility, but hurts the micro nature of uPy. Addresses issue #577.
2014-05-06py: enumerate(): Add NotImplementedError for kwargs.Paul Sokolovsky
Addresses #577.
2014-05-03Add license header to (almost) all files.Damien George
Blanket wide to all .c and .h files. Some files originating from ST are difficult to deal with (license wise) so it was left out of those. Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
2014-05-03Merge pull request #535 from pfalcon/blurbDamien George
Proposed license/copyright file header.
2014-05-02py, unix: Make "mpconfig.h" be first included, as other headers depend on it.Paul Sokolovsky
Specifically, nlr.h does.
2014-05-01py: Add copyright/license header to each file.Paul Sokolovsky
2014-04-26Simplify names for argcheck.c / arg parsing.Damien George
2014-04-21py: Small change to mp_arg_parse_all.Damien George
2014-04-20py: Fix mp_arg_parse_all.Damien George
2014-04-20py: Add arg checking helper functions.Damien George
These are to assist in writing native C functions that take positional and keyword arguments. mp_arg_check_num is for just checking the number of arguments is correct. mp_arg_parse_all is for parsing positional and keyword arguments with default values.