BLUELOVETH 2 ani în urmă
părinte
comite
9906748e9c
1 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 2 1
      src/pocketpy.h

+ 2 - 1
src/pocketpy.h

@@ -205,7 +205,8 @@ inline void init_builtins(VM* _vm) {
     _vm->bind__repr__(_vm->tp_object, [](VM* vm, PyObject* obj) {
     _vm->bind__repr__(_vm->tp_object, [](VM* vm, PyObject* obj) {
         if(is_tagged(obj)) FATAL_ERROR();
         if(is_tagged(obj)) FATAL_ERROR();
         std::stringstream ss;
         std::stringstream ss;
-        ss << "<" << OBJ_NAME(vm->_t(obj)) << " object at 0x" << std::hex << obj << ">";
+        ss << "<" << OBJ_NAME(vm->_t(obj)) << " object at 0x";
+        ss << std::hex << reinterpret_cast<intptr_t>(obj) << ">";
         return VAR(ss.str());
         return VAR(ss.str());
     });
     });