diff options
| author | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-02-24 15:13:07 +0100 |
|---|---|---|
| committer | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-02-24 15:13:07 +0100 |
| commit | 12fa5b3a66d6f0034113a56c7d647c7bac5be74c (patch) | |
| tree | cc4d5103421f930b7ebaa20eb7d6c8d59c6b6f0d /py/objobject.c | |
| parent | efd429464ed82c78fd2e11244a803c7ec2cb2211 (diff) | |
Switch exception throwing to mp_raise helpers. It saves a little code space each time to share the call.
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); |
