diff options
| author | Dan Halbert <halbert@halwitz.org> | 2018-08-09 20:00:18 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-09 20:00:18 -0400 |
| commit | bbc034cd3dfc46ee7938faedc915fec91610c6a3 (patch) | |
| tree | 4fe11d359088e41790030fce0763471b76ab3fb4 /py/objobject.c | |
| parent | b735b9dbed2132f07793324a40770f4bd96d9ae8 (diff) | |
| parent | 24e53ad5911f42efb6508b4a8dcf4a196a81494a (diff) | |
Merge pull request #1104 from tannewt/more_strings
Fixes and translate more strings.
Diffstat (limited to 'py/objobject.c')
| -rw-r--r-- | py/objobject.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/py/objobject.c b/py/objobject.c index 265fcfbf2..fa8c29cff 100644 --- a/py/objobject.c +++ b/py/objobject.c @@ -29,6 +29,8 @@ #include "py/objtype.h" #include "py/runtime.h" +#include "supervisor/shared/translate.h" + typedef struct _mp_obj_object_t { mp_obj_base_t base; } mp_obj_object_t; @@ -50,7 +52,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_TypeError("__new__ arg must be a user-type"); + mp_raise_TypeError(translate("__new__ arg must be a user-type")); } // This executes only "__new__" part of instance creation. // TODO: This won't work well for classes with native bases. |
