Skip to content

Commit 0058f86

Browse files
committed
Accept HPy slot HPy_tp_destroy
1 parent 331053a commit 0058f86

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public abstract class GraalHPyDef {
5555
public static final HiddenKey TYPE_HPY_BASICSIZE = new HiddenKey("hpy_basicsize");
5656
public static final HiddenKey TYPE_HPY_ITEMSIZE = new HiddenKey("hpy_itemsize");
5757
public static final HiddenKey TYPE_HPY_FLAGS = new HiddenKey("hpy_flags");
58+
public static final HiddenKey TYPE_HPY_DESTROY = new HiddenKey("hpy_destroy");
5859
public static final HiddenKey OBJECT_HPY_NATIVE_SPACE = new HiddenKey("hpy_native_space");
5960

6061
/* enum values of 'HPyDef_Kind' */
@@ -198,7 +199,7 @@ enum HPySlot {
198199
HPY_NB_MATRIX_MULTIPLY(75, SpecialMethodNames.__MATMUL__, HPyFuncSignature.BINARYFUNC),
199200
HPY_NB_INPLACE_MATRIX_MULTIPLY(76, SpecialMethodNames.__IMATMUL__, HPyFuncSignature.BINARYFUNC),
200201
// TODO(fa): use a hidden key ?
201-
HPY_TP_DESTROY(1000, null, HPyFuncSignature.DESTROYFUNC);
202+
HPY_TP_DESTROY(1000, TYPE_HPY_DESTROY, HPyFuncSignature.DESTROYFUNC);
202203

203204
/** The corresponding C enum value. */
204205
private final int value;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ static PBuiltinFunction createWrapperFunction(PythonLanguage language, HPyFuncSi
126126
case REPRFUNC:
127127
case GETITERFUNC:
128128
case ITERNEXTFUNC:
129+
case DESTROYFUNC:
129130
rootNode = new HPyMethNoargsRoot(language, name, callable, false);
130131
break;
131132
case O:

0 commit comments

Comments
 (0)