Skip to content

Commit 331053a

Browse files
committed
Support HPy slot HPy_sq_length
1 parent a6dde19 commit 331053a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

graalpython/com.oracle.graal.python.cext/include/common/autogen_hpyslot.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ typedef enum {
6666
HPy_nb_true_divide = 37,
6767
HPy_nb_xor = 38,
6868
HPy_sq_item = 44,
69+
HPy_sq_length = 45,
6970
HPy_tp_init = 60,
7071
HPy_tp_new = 65,
7172
HPy_tp_repr = 66,
@@ -108,6 +109,7 @@ typedef enum {
108109
#define _HPySlot_SIG__HPy_nb_true_divide HPyFunc_BINARYFUNC
109110
#define _HPySlot_SIG__HPy_nb_xor HPyFunc_BINARYFUNC
110111
#define _HPySlot_SIG__HPy_sq_item HPyFunc_SSIZEARGFUNC
112+
#define _HPySlot_SIG__HPy_sq_length HPyFunc_LENFUNC
111113
#define _HPySlot_SIG__HPy_tp_init HPyFunc_INITPROC
112114
#define _HPySlot_SIG__HPy_tp_new HPyFunc_KEYWORDS
113115
#define _HPySlot_SIG__HPy_tp_repr HPyFunc_REPRFUNC

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/hpy/GraalHPyDef.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ enum HPySlot {
191191
HPY_NB_TRUE_DIVIDE(37, SpecialMethodNames.__TRUEDIV__, HPyFuncSignature.BINARYFUNC),
192192
HPY_NB_XOR(38, SpecialMethodNames.__XOR__, HPyFuncSignature.BINARYFUNC),
193193
HPY_SQ_ITEM(44, SpecialMethodNames.__GETITEM__, HPyFuncSignature.SSIZEARGFUNC),
194+
HPY_SQ_LENGTH(45, SpecialMethodNames.__LEN__, HPyFuncSignature.LENFUNC),
194195
HPY_TP_INIT(60, SpecialMethodNames.__INIT__, HPyFuncSignature.INITPROC),
195196
HPY_TP_NEW(65, SpecialMethodNames.__NEW__, HPyFuncSignature.KEYWORDS),
196197
HPY_TP_REPR(66, SpecialMethodNames.__REPR__, HPyFuncSignature.REPRFUNC),

0 commit comments

Comments
 (0)