1
0
blueloveTH 1 жил өмнө
parent
commit
d5d7853598

+ 1 - 1
src/interpreter/ceval.c

@@ -947,7 +947,7 @@ FrameResult VM__run_top_frame(VM* self) {
                 }
                 }
 
 
                 py_Type type =
                 py_Type type =
-                    pk_newtype(py_name2str(name), base, frame->module, NULL, true, false);
+                    pk_newtype(py_name2str(name), base, frame->module, NULL, base_ti->is_python, false);
                 PUSH(py_tpobject(type));
                 PUSH(py_tpobject(type));
                 self->__curr_class = TOP();
                 self->__curr_class = TOP();
                 DISPATCH();
                 DISPATCH();

+ 1 - 1
src/public/py_object.c

@@ -7,7 +7,7 @@ bool pk__object_new(int argc, py_Ref argv) {
     py_Type cls = py_totype(py_arg(0));
     py_Type cls = py_totype(py_arg(0));
     py_TypeInfo* ti = pk__type_info(cls);
     py_TypeInfo* ti = pk__type_info(cls);
     if(!ti->is_python) {
     if(!ti->is_python) {
-        return TypeError("object.__new__(%t) is not safe, use %t.__new__()", cls, cls);
+        return TypeError("object.__new__(%t) is not safe, use %t.__new__() instead", cls, cls);
     }
     }
     py_newobject(py_retval(), cls, -1, 0);
     py_newobject(py_retval(), cls, -1, 0);
     return true;
     return true;