Cache __format__ method

This commit is contained in:
K. Lange 2022-07-10 16:09:32 +09:00
parent f24cb336e7
commit f1c0af711e
2 changed files with 2 additions and 0 deletions

View File

@ -238,6 +238,7 @@ typedef struct KrkClass {
KrkObj * _matmul, * _rmatmul, * _imatmul;
KrkObj * _pos;
KrkObj * _setattr;
KrkObj * _format;
} KrkClass;
/**

View File

@ -46,6 +46,7 @@ CACHED_METHOD(NEGATE, "__neg__", _negate)
CACHED_METHOD(SETNAME, "__set_name__", _set_name)
CACHED_METHOD(POS, "__pos__", _pos)
CACHED_METHOD(SETATTR, "__setattr__", _setattr)
CACHED_METHOD(FORMAT, "__format__", _format)
/* These are not methods */
SPECIAL_ATTRS(CLASS, "__class__")