diff options
author | Damien George <damien.p.george@gmail.com> | 2017-03-28 22:37:26 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-03-28 22:37:26 +1100 |
commit | 94c41bb06f6482ece0717c5bd63266b8da063caa (patch) | |
tree | df160d43c3e16b8de060a1968a85c49f235077b0 /py/objobject.c | |
parent | 7b1804c582a2ddb5a841335c43bd94faaee72584 (diff) |
py: Use mp_raise_TypeError/mp_raise_ValueError helpers where possible.
Saves 168 bytes on bare-arm.
Diffstat (limited to 'py/objobject.c')
-rw-r--r-- | py/objobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objobject.c b/py/objobject.c index b33dc491c..f9a7d17c3 100644 --- a/py/objobject.c +++ b/py/objobject.c @@ -50,7 +50,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(object___init___obj, object___init__); STATIC mp_obj_t object___new__(mp_obj_t cls) { if (!MP_OBJ_IS_TYPE(cls, &mp_type_type) || !mp_obj_is_instance_type((mp_obj_type_t*)MP_OBJ_TO_PTR(cls))) { - mp_raise_msg(&mp_type_TypeError, "__new__ arg must be a user-type"); + mp_raise_TypeError("__new__ arg must be a user-type"); } mp_obj_t o = MP_OBJ_SENTINEL; mp_obj_t res = mp_obj_instance_make_new(MP_OBJ_TO_PTR(cls), 1, 0, &o); |