From a79e2cd3b8c7d8b7705283dd6c0ddf9965db1e9c Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Sun, 24 Mar 2024 22:45:24 +0800 Subject: [PATCH] some fix --- include/pocketpy/obj.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/pocketpy/obj.h b/include/pocketpy/obj.h index 36d5900a..f306706f 100644 --- a/include/pocketpy/obj.h +++ b/include/pocketpy/obj.h @@ -101,10 +101,8 @@ struct PyObject{ NameDict* _attr; bool is_attr_valid() const noexcept { return _attr != nullptr; } - NameDict& attr() noexcept { return *_attr; } - PyObject* attr(StrName name) const noexcept { return (*_attr)[name]; } - - // PyObject* operator[](StrName name) const noexcept { return (*_attr)[name]; } + NameDict& attr() { return *_attr; } + PyObject* attr(StrName name) const { return (*_attr)[name]; } virtual void _obj_gc_mark() = 0; virtual void* _value_ptr() = 0;