Skip to content

Commit 780805d

Browse files
msimaceksteve-s
authored andcommitted
ctypes classes should not have a __dict__
1 parent 2b10ffa commit 780805d

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/PythonBuiltinClassType.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -335,25 +335,25 @@ public enum PythonBuiltinClassType implements TruffleObject {
335335
AST("AST", "_ast", "ast", Flags.PUBLIC_BASE_WDICT),
336336

337337
// _ctype
338-
CArgObject("CArgObject", Flags.PUBLIC_BASE_WDICT),
339-
CThunkObject("CThunkObject", J__CTYPES, Flags.PUBLIC_BASE_WDICT),
338+
CArgObject("CArgObject", Flags.PUBLIC_BASE_WODICT),
339+
CThunkObject("CThunkObject", J__CTYPES, Flags.PUBLIC_BASE_WODICT),
340340
StgDict("StgDict", Flags.PRIVATE_DERIVED_WODICT, DICT_M_FLAGS),
341-
PyCStructType("PyCStructType", J__CTYPES, Flags.PUBLIC_BASE_WDICT, PYCSTRUCTTYPE_M_FLAGS),
342-
UnionType("UnionType", J__CTYPES, Flags.PUBLIC_BASE_WDICT, UNIONTYPE_M_FLAGS),
343-
PyCPointerType("PyCPointerType", J__CTYPES, Flags.PUBLIC_BASE_WDICT, PYCPOINTERTYPE_M_FLAGS),
344-
PyCArrayType("PyCArrayType", J__CTYPES, Flags.PUBLIC_BASE_WDICT, PYCARRAYTYPE_M_FLAGS),
345-
PyCSimpleType("PyCSimpleType", J__CTYPES, Flags.PUBLIC_BASE_WDICT, PYCSIMPLETYPE_M_FLAGS),
346-
PyCFuncPtrType("PyCFuncPtrType", J__CTYPES, Flags.PUBLIC_BASE_WDICT, PYCFUNCPTRTYPE_M_FLAGS),
347-
Structure("Structure", J__CTYPES, Flags.PUBLIC_BASE_WDICT), /*- type = PyCStructType */
348-
Union("Union", J__CTYPES, Flags.PUBLIC_BASE_WDICT), /*- type = UnionType */
349-
PyCPointer("_Pointer", J__CTYPES, Flags.PUBLIC_BASE_WDICT, PYCPOINTER_M_FLAGS), /*- type = PyCPointerType */
350-
PyCArray("Array", J__CTYPES, Flags.PUBLIC_BASE_WDICT, PYCARRAY_M_FLAGS), /*- type = PyCArrayType */
351-
PyCData("_CData", J__CTYPES, Flags.PUBLIC_BASE_WDICT), /*- type = PyCStructType */
352-
SimpleCData("_SimpleCData", J__CTYPES, Flags.PUBLIC_BASE_WDICT, SIMPLECDATA_M_FLAGS), /*- type = PyCStructType */
353-
PyCFuncPtr("PyCFuncPtr", J__CTYPES, Flags.PUBLIC_BASE_WDICT, PYCFUNCPTR_M_FLAGS), /*- type = PyCFuncPtrType */
354-
CField("CField", J__CTYPES, Flags.PUBLIC_BASE_WDICT),
355-
DictRemover("DictRemover", J__CTYPES, Flags.PUBLIC_BASE_WDICT),
356-
StructParam("StructParam_Type", J__CTYPES, Flags.PUBLIC_BASE_WDICT),
341+
PyCStructType("PyCStructType", J__CTYPES, Flags.PUBLIC_BASE_WODICT, PYCSTRUCTTYPE_M_FLAGS),
342+
UnionType("UnionType", J__CTYPES, Flags.PUBLIC_BASE_WODICT, UNIONTYPE_M_FLAGS),
343+
PyCPointerType("PyCPointerType", J__CTYPES, Flags.PUBLIC_BASE_WODICT, PYCPOINTERTYPE_M_FLAGS),
344+
PyCArrayType("PyCArrayType", J__CTYPES, Flags.PUBLIC_BASE_WODICT, PYCARRAYTYPE_M_FLAGS),
345+
PyCSimpleType("PyCSimpleType", J__CTYPES, Flags.PUBLIC_BASE_WODICT, PYCSIMPLETYPE_M_FLAGS),
346+
PyCFuncPtrType("PyCFuncPtrType", J__CTYPES, Flags.PUBLIC_BASE_WODICT, PYCFUNCPTRTYPE_M_FLAGS),
347+
Structure("Structure", J__CTYPES, Flags.PUBLIC_BASE_WODICT), /*- type = PyCStructType */
348+
Union("Union", J__CTYPES, Flags.PUBLIC_BASE_WODICT), /*- type = UnionType */
349+
PyCPointer("_Pointer", J__CTYPES, Flags.PUBLIC_BASE_WODICT, PYCPOINTER_M_FLAGS), /*- type = PyCPointerType */
350+
PyCArray("Array", J__CTYPES, Flags.PUBLIC_BASE_WODICT, PYCARRAY_M_FLAGS), /*- type = PyCArrayType */
351+
PyCData("_CData", J__CTYPES, Flags.PUBLIC_BASE_WODICT), /*- type = PyCStructType */
352+
SimpleCData("_SimpleCData", J__CTYPES, Flags.PUBLIC_BASE_WODICT, SIMPLECDATA_M_FLAGS), /*- type = PyCStructType */
353+
PyCFuncPtr("PyCFuncPtr", J__CTYPES, Flags.PUBLIC_BASE_WODICT, PYCFUNCPTR_M_FLAGS), /*- type = PyCFuncPtrType */
354+
CField("CField", J__CTYPES, Flags.PUBLIC_BASE_WODICT),
355+
DictRemover("DictRemover", J__CTYPES, Flags.PUBLIC_BASE_WODICT),
356+
StructParam("StructParam_Type", J__CTYPES, Flags.PUBLIC_BASE_WODICT),
357357
ArgError("ArgumentError", J__CTYPES, Flags.EXCEPTION),
358358

359359
// _multibytecodec

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/type/TypeNodes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2589,10 +2589,10 @@ public static long executeUncached(Object cls) {
25892589
@Specialization
25902590
long lookup(Object cls,
25912591
@Cached(inline = false) CExtNodes.LookupNativeI64MemberFromBaseNode lookup) {
2592-
return lookup.execute(cls, PyTypeObject__tp_dictoffset, TYPE_DICTOFFSET, GetDictOffsetNode::getBuiltinTypeItemsize);
2592+
return lookup.execute(cls, PyTypeObject__tp_dictoffset, TYPE_DICTOFFSET, GetDictOffsetNode::getBuiltinDictoffset);
25932593
}
25942594

2595-
private static int getBuiltinTypeItemsize(PythonBuiltinClassType cls) {
2595+
private static int getBuiltinDictoffset(PythonBuiltinClassType cls) {
25962596
// TODO properly specify for all builtin classes
25972597
PythonBuiltinClassType current = cls;
25982598
do {

0 commit comments

Comments
 (0)