39
39
40
40
SWIFT_BEGIN_NULLABILITY_ANNOTATIONS
41
41
42
- typedef long SwiftInt ;
43
- typedef unsigned long SwiftUInt ;
44
-
45
42
typedef struct {
46
43
const void * _Nullable data ;
47
- long numElements ;
44
+ SwiftInt numElements ;
48
45
} BridgedArrayRef ;
49
46
50
47
typedef struct {
@@ -65,7 +62,7 @@ typedef struct {
65
62
void * _Nullable TrailingCommaLoc ;
66
63
} BridgedTupleTypeElement ;
67
64
68
- typedef enum ENUM_EXTENSIBILITY_ATTR (open ) BridgedRequirementReprKind : long {
65
+ typedef enum ENUM_EXTENSIBILITY_ATTR (open ) BridgedRequirementReprKind : SwiftInt {
69
66
/// A type bound T : P, where T is a type that depends on a generic
70
67
/// parameter and P is some type that should bound T, either as a concrete
71
68
/// supertype or a protocol to which T must conform.
@@ -92,7 +89,7 @@ typedef struct {
92
89
} BridgedRequirementRepr ;
93
90
94
91
/// Diagnostic severity when reporting diagnostics.
95
- typedef enum ENUM_EXTENSIBILITY_ATTR (open ) BridgedDiagnosticSeverity : long {
92
+ typedef enum ENUM_EXTENSIBILITY_ATTR (open ) BridgedDiagnosticSeverity : SwiftInt {
96
93
BridgedFatalError ,
97
94
BridgedError ,
98
95
BridgedWarning ,
@@ -102,7 +99,7 @@ typedef enum ENUM_EXTENSIBILITY_ATTR(open) BridgedDiagnosticSeverity : long {
102
99
103
100
typedef void * BridgedDiagnostic ;
104
101
105
- typedef enum ENUM_EXTENSIBILITY_ATTR (open ) BridgedMacroDefinitionKind : long {
102
+ typedef enum ENUM_EXTENSIBILITY_ATTR (open ) BridgedMacroDefinitionKind : SwiftInt {
106
103
/// An expanded macro.
107
104
BridgedExpandedMacro = 0 ,
108
105
/// An external macro, spelled with either the old spelling (Module.Type)
@@ -130,7 +127,7 @@ BridgedDiagnostic SwiftDiagnostic_create(void *diagnosticEngine,
130
127
BridgedDiagnosticSeverity severity ,
131
128
const void * _Nullable sourceLoc ,
132
129
const unsigned char * _Nullable text ,
133
- long textLen );
130
+ SwiftInt textLen );
134
131
135
132
/// Highlight a source range as part of the diagnostic.
136
133
void SwiftDiagnostic_highlight (
@@ -141,14 +138,14 @@ void SwiftDiagnostic_fixItReplace(BridgedDiagnostic diag,
141
138
const void * _Nullable replaceStartLoc ,
142
139
const void * _Nullable replaceEndLoc ,
143
140
const unsigned char * _Nullable newText ,
144
- long newTextLen );
141
+ SwiftInt newTextLen );
145
142
146
143
/// Finish the given diagnostic and emit it.
147
144
void SwiftDiagnostic_finish (BridgedDiagnostic diag );
148
145
149
146
BridgedIdentifier
150
147
SwiftASTContext_getIdentifier (void * ctx , const unsigned char * _Nullable str ,
151
- long len );
148
+ SwiftInt len );
152
149
153
150
void * SwiftImportDecl_create (void * , void * , void * , char , void * ,
154
151
BridgedArrayRef , BridgedArrayRef );
@@ -173,11 +170,11 @@ void *SwiftIdentifierExpr_create(void *ctx, BridgedIdentifier base, void *loc);
173
170
174
171
void * SwiftStringLiteralExpr_create (void * ctx ,
175
172
const unsigned char * _Nullable string ,
176
- long len , void * TokenLoc );
173
+ SwiftInt len , void * TokenLoc );
177
174
178
175
void * SwiftIntegerLiteralExpr_create (void * ctx ,
179
176
const unsigned char * _Nullable string ,
180
- long len , void * TokenLoc );
177
+ SwiftInt len , void * TokenLoc );
181
178
182
179
void * SwiftBooleanLiteralExpr_create (void * ctx , _Bool value , void * TokenLoc );
183
180
@@ -194,7 +191,7 @@ void *SingleValueStmtExpr_createWithWrappedBranches(void *ctx, void *S,
194
191
void * IfStmt_create (void * ctx , void * ifLoc , void * cond , void * _Nullable then ,
195
192
void * _Nullable elseLoc , void * _Nullable elseStmt );
196
193
197
- typedef enum ENUM_EXTENSIBILITY_ATTR (open ) ASTNodeKind : long {
194
+ typedef enum ENUM_EXTENSIBILITY_ATTR (open ) ASTNodeKind : SwiftInt {
198
195
ASTNodeKindExpr ,
199
196
ASTNodeKindStmt ,
200
197
ASTNodeKindDecl
@@ -208,7 +205,7 @@ struct ASTNodeBridged {
208
205
void * BraceStmt_create (void * ctx , void * lbloc , BridgedArrayRef elements ,
209
206
void * rbloc );
210
207
211
- void * BridgedSourceLoc_advanced (void * loc , long len );
208
+ void * BridgedSourceLoc_advanced (void * loc , SwiftInt len );
212
209
213
210
void * ParamDecl_create (void * ctx , void * loc , void * _Nullable argLoc ,
214
211
void * _Nullable argName , void * _Nullable paramLoc ,
@@ -282,7 +279,7 @@ void *GenericParamList_create(void *ctx, void *lAngleLoc,
282
279
BridgedArrayRef reqs , void * rAngleLoc );
283
280
void * GenericTypeParamDecl_create (void * ctx , void * declContext ,
284
281
BridgedIdentifier name , void * nameLoc ,
285
- void * _Nullable eachLoc , long index ,
282
+ void * _Nullable eachLoc , SwiftInt index ,
286
283
_Bool isParameterPack );
287
284
void GenericTypeParamDecl_setInheritedType (void * ctx , void * Param , void * ty );
288
285
0 commit comments