You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/hpy/GraalHPyNodes.java
Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/ErrorMessages.java
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1485,6 +1485,13 @@ public abstract class ErrorMessages {
1485
1485
publicstaticfinalTruffleStringHPY_CANNOT_SPECIFY_LEG_SLOTS_WO_SETTING_LEG = tsLiteral("cannot specify .legacy_slots without setting .builtin_shape=HPyType_BuiltinShape_Legacy");
1486
1486
publicstaticfinalTruffleStringHPY_CANNOT_USE_CALL_WITH_LEGACY = tsLiteral("Cannot use HPy call protocol with legacy types that inherit the struct. " +
1487
1487
"Either set the basicsize to a non-zero value or use legacy slot 'Py_tp_call'.");
1488
+
privatestaticfinalStringHPY_NON_DEFAULT_MESSAGE = "This is not allowed because custom HPy_mod_create slot cannot return a builtin module object and cannot make any use of any other " +
1489
+
"data defined in the HPyModuleDef. Either do not define HPy_mod_create slot and let the runtime create a builtin module object from the provided HPyModuleDef, or do not " +
1490
+
"define anything else but the HPy_mod_create slot.";
1491
+
publicstaticfinalTruffleStringHPY_DEFINES_CREATE_AND_NON_DEFAULT = tsLiteral("HPyModuleDef defines a HPy_mod_create slot and some of the other fields are not set to their default value. " +
1492
+
HPY_NON_DEFAULT_MESSAGE);
1493
+
publicstaticfinalTruffleStringHPY_DEFINES_CREATE_AND_OTHER_SLOTS = tsLiteral("HPyModuleDef defines a HPy_mod_create slot and some other slots or methods. " +
1494
+
HPY_NON_DEFAULT_MESSAGE);
1488
1495
1489
1496
// AST Validator
1490
1497
publicstaticfinalTruffleStringANN_ASSIGN_WITH_SIMPLE_NON_NAME_TARGET = tsLiteral("AnnAssign with simple non-Name target");
0 commit comments