mirror of
https://github.com/pocketpy/pocketpy
synced 2026-08-05 05:37:10 +08:00
Update py_object.c
This commit is contained in:
parent
21ff0751dc
commit
27fde79de6
@ -36,10 +36,13 @@ static bool object__ne__(int argc, py_Ref argv) {
|
||||
|
||||
static bool object__repr__(int argc, py_Ref argv) {
|
||||
PY_CHECK_ARGC(1);
|
||||
assert(argv->is_ptr);
|
||||
c11_sbuf buf;
|
||||
c11_sbuf__ctor(&buf);
|
||||
pk_sprintf(&buf, "<%t object at %p>", argv->type, argv->_obj);
|
||||
if(argv->is_ptr) {
|
||||
pk_sprintf(&buf, "<%t object at %p>", argv->type, argv->_obj);
|
||||
} else {
|
||||
pk_sprintf(&buf, "<%t trivial object>", argv->type);
|
||||
}
|
||||
c11_sbuf__py_submit(&buf, py_retval());
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user