@@ -36,37 +36,37 @@ import (
36
36
37
37
const (
38
38
// Set if the type object is dynamically allocated
39
- TPFLAGS_HEAPTYPE = 1 << 9
39
+ TPFLAGS_HEAPTYPE uint = 1 << 9
40
40
41
41
// Set if the type allows subclassing
42
- TPFLAGS_BASETYPE = 1 << 10
42
+ TPFLAGS_BASETYPE uint = 1 << 10
43
43
44
44
// Set if the type is 'ready' -- fully initialized
45
- TPFLAGS_READY = 1 << 12
45
+ TPFLAGS_READY uint = 1 << 12
46
46
47
47
// Set while the type is being 'readied', to prevent recursive ready calls
48
- TPFLAGS_READYING = 1 << 13
48
+ TPFLAGS_READYING uint = 1 << 13
49
49
50
50
// Objects support garbage collection (see objimp.h)
51
- TPFLAGS_HAVE_GC = 1 << 14
51
+ TPFLAGS_HAVE_GC uint = 1 << 14
52
52
53
53
// Objects support type attribute cache
54
- TPFLAGS_HAVE_VERSION_TAG = 1 << 18
55
- TPFLAGS_VALID_VERSION_TAG = 1 << 19
54
+ TPFLAGS_HAVE_VERSION_TAG uint = 1 << 18
55
+ TPFLAGS_VALID_VERSION_TAG uint = 1 << 19
56
56
57
57
// Type is abstract and cannot be instantiated
58
- TPFLAGS_IS_ABSTRACT = 1 << 20
58
+ TPFLAGS_IS_ABSTRACT uint = 1 << 20
59
59
60
60
// These flags are used to determine if a type is a subclass.
61
- TPFLAGS_INT_SUBCLASS = 1 << 23
62
- TPFLAGS_LONG_SUBCLASS = 1 << 24
63
- TPFLAGS_LIST_SUBCLASS = 1 << 25
64
- TPFLAGS_TUPLE_SUBCLASS = 1 << 26
65
- TPFLAGS_BYTES_SUBCLASS = 1 << 27
66
- TPFLAGS_UNICODE_SUBCLASS = 1 << 28
67
- TPFLAGS_DICT_SUBCLASS = 1 << 29
68
- TPFLAGS_BASE_EXC_SUBCLASS = 1 << 30
69
- TPFLAGS_TYPE_SUBCLASS = 1 << 31
61
+ TPFLAGS_INT_SUBCLASS uint = 1 << 23
62
+ TPFLAGS_LONG_SUBCLASS uint = 1 << 24
63
+ TPFLAGS_LIST_SUBCLASS uint = 1 << 25
64
+ TPFLAGS_TUPLE_SUBCLASS uint = 1 << 26
65
+ TPFLAGS_BYTES_SUBCLASS uint = 1 << 27
66
+ TPFLAGS_UNICODE_SUBCLASS uint = 1 << 28
67
+ TPFLAGS_DICT_SUBCLASS uint = 1 << 29
68
+ TPFLAGS_BASE_EXC_SUBCLASS uint = 1 << 30
69
+ TPFLAGS_TYPE_SUBCLASS uint = 1 << 31
70
70
71
71
TPFLAGS_DEFAULT = TPFLAGS_HAVE_VERSION_TAG
72
72
)
@@ -92,7 +92,7 @@ type Type struct {
92
92
// Weaklist Tuple
93
93
New NewFunc
94
94
Init InitFunc
95
- Flags int // Flags to define presence of optional/expanded features
95
+ Flags uint // Flags to define presence of optional/expanded features
96
96
Qualname string
97
97
98
98
/*
@@ -283,7 +283,7 @@ func NewTypeX(Name string, Doc string, New NewFunc, Init InitFunc) *Type {
283
283
// Make a subclass of a type
284
284
//
285
285
// For making Go types
286
- func (t * Type ) NewTypeFlags (Name string , Doc string , New NewFunc , Init InitFunc , Flags int ) * Type {
286
+ func (t * Type ) NewTypeFlags (Name string , Doc string , New NewFunc , Init InitFunc , Flags uint ) * Type {
287
287
// inherit constructors
288
288
if New == nil {
289
289
New = t .New
0 commit comments