summaryrefslogtreecommitdiffstatshomepage
path: root/py/objobject.c
Commit message (Collapse)AuthorAge
* all: Use the name MicroPython consistently in commentsAlexander Steffen2017-07-31
| | | | | There were several different spellings of MicroPython present in comments, when there should be only one.
* py: Use mp_raise_TypeError/mp_raise_ValueError helpers where possible.Damien George2017-03-28
| | | | Saves 168 bytes on bare-arm.
* py: Use mp_raise_msg helper function where appropriate.Damien George2016-10-17
| | | | | 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.
* py: Change first arg of type.make_new from mp_obj_t to mp_obj_type_t*.Damien George2016-01-11
| | | | | | | | The first argument to the type.make_new method is naturally a uPy type, and all uses of this argument cast it directly to a pointer to a type structure. So it makes sense to just have it a pointer to a type from the very beginning (and a const pointer at that). This patch makes such a change, and removes all unnecessary casting to/from mp_obj_t.
* py: Change type of .make_new and .call args: mp_uint_t becomes size_t.Damien George2016-01-11
| | | | | | | This patch changes the type signature of .make_new and .call object method slots to use size_t for n_args and n_kw (was mp_uint_t. Makes code more efficient when mp_uint_t is larger than a machine word. Doesn't affect ports when size_t and mp_uint_t have the same size.
* py: Wrap all obj-ptr conversions in MP_OBJ_TO_PTR/MP_OBJ_FROM_PTR.Damien George2015-11-29
| | | | | | | | | This allows the mp_obj_t type to be configured to something other than a pointer-sized primitive type. This patch also includes additional changes to allow the code to compile when sizeof(mp_uint_t) != sizeof(void*), such as using size_t instead of mp_uint_t, and various casts.
* py: Add MP_ROM_* macros and mp_rom_* types and use them.Damien George2015-11-29
|
* py/objobject: Don't make locals_dict if there's nothing to go in it.Kaspar Schleiser2015-05-17
|
* py: Check that arg to object.__new__ is a user-defined type.Damien George2015-05-04
| | | | Addresses issue #1203.
* py: Use mp_arg_check_num in some _make_new functions.Damien George2015-01-20
| | | | Reduces stmhal code size by about 250 bytes.
* py, unix: Allow to compile with -Wunused-parameter.Damien George2015-01-20
| | | | See issue #699.
* py: Move to guarded includes, everywhere in py/ core.Damien George2015-01-01
| | | | Addresses issue #1022.
* Change some parts of the core API to use mp_uint_t instead of uint/int.Damien George2014-08-30
| | | | Addressing issue #50, still some way to go yet.
* py: Initial attempts to actually allow implementing __new__ in Python.Paul Sokolovsky2014-05-22
| | | | | Caveat is that __new__ should recurse to base class __new__, and ultimately, object.__new__ is what handles instance allocation.
* objobject: Fix arguments to __init__().Paul Sokolovsky2014-05-21
|
* objtype: super: Fall back to "object" lookup as last resort.Paul Sokolovsky2014-05-21
| | | | | Also, define object.__init__() (semantically empty, purely CPython compat measure). Addresses #520.
* Add license header to (almost) all files.Damien George2014-05-03
| | | | | | | 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/.
* py, unix: Make "mpconfig.h" be first included, as other headers depend on it.Paul Sokolovsky2014-05-02
| | | | Specifically, nlr.h does.
* py: Make all objects and instances derive from object.Damien George2014-04-05
| | | | | This makes isinstance(X, object) and issubclass(X, object) true for all X.
* py: Change nlr_jump to nlr_raise, to aid in debugging.Damien George2014-04-05
| | | | | | This does not affect code size or performance when debugging turned off. To address issue #420.
* py: Add 'object' object.Damien George2014-03-22