@@ -262,7 +262,7 @@ extern PyObject* _PyCode_GetFreevars(PyCodeObject *);
262
262
extern PyObject * _PyCode_GetCode (PyCodeObject * );
263
263
264
264
/** API for initializing the line number tables. */
265
- extern int _PyCode_InitAddressRange (PyCodeObject * co , PyCodeAddressRange * bounds );
265
+ PyAPI_FUNC ( int ) _PyCode_InitAddressRange (PyCodeObject * co , PyCodeAddressRange * bounds );
266
266
267
267
/** Out of process API for initializing the location table. */
268
268
extern void _PyLineTable_InitAddressRange (
@@ -272,7 +272,7 @@ extern void _PyLineTable_InitAddressRange(
272
272
PyCodeAddressRange * range );
273
273
274
274
/** API for traversing the line number table. */
275
- extern int _PyLineTable_NextAddressRange (PyCodeAddressRange * range );
275
+ PyAPI_FUNC ( int ) _PyLineTable_NextAddressRange (PyCodeAddressRange * range );
276
276
extern int _PyLineTable_PreviousAddressRange (PyCodeAddressRange * range );
277
277
// This is used in dump_frame() in traceback.c without an attached tstate.
278
278
extern int _PyCode_Addr2LineNoTstate (PyCodeObject * co , int addr );
@@ -293,33 +293,34 @@ extern void _PyCode_Clear_Executors(PyCodeObject *code);
293
293
#define ENABLE_SPECIALIZATION_FT ENABLE_SPECIALIZATION
294
294
#endif
295
295
296
- /* Specialization functions */
296
+ /* Specialization functions, these are exported only for other re-generated
297
+ * interpreters to call */
297
298
298
- extern void _Py_Specialize_LoadSuperAttr (_PyStackRef global_super , _PyStackRef cls ,
299
+ PyAPI_FUNC ( void ) _Py_Specialize_LoadSuperAttr (_PyStackRef global_super , _PyStackRef cls ,
299
300
_Py_CODEUNIT * instr , int load_method );
300
- extern void _Py_Specialize_LoadAttr (_PyStackRef owner , _Py_CODEUNIT * instr ,
301
+ PyAPI_FUNC ( void ) _Py_Specialize_LoadAttr (_PyStackRef owner , _Py_CODEUNIT * instr ,
301
302
PyObject * name );
302
- extern void _Py_Specialize_StoreAttr (_PyStackRef owner , _Py_CODEUNIT * instr ,
303
+ PyAPI_FUNC ( void ) _Py_Specialize_StoreAttr (_PyStackRef owner , _Py_CODEUNIT * instr ,
303
304
PyObject * name );
304
- extern void _Py_Specialize_LoadGlobal (PyObject * globals , PyObject * builtins ,
305
+ PyAPI_FUNC ( void ) _Py_Specialize_LoadGlobal (PyObject * globals , PyObject * builtins ,
305
306
_Py_CODEUNIT * instr , PyObject * name );
306
- extern void _Py_Specialize_StoreSubscr (_PyStackRef container , _PyStackRef sub ,
307
+ PyAPI_FUNC ( void ) _Py_Specialize_StoreSubscr (_PyStackRef container , _PyStackRef sub ,
307
308
_Py_CODEUNIT * instr );
308
- extern void _Py_Specialize_Call (_PyStackRef callable , _Py_CODEUNIT * instr ,
309
+ PyAPI_FUNC ( void ) _Py_Specialize_Call (_PyStackRef callable , _Py_CODEUNIT * instr ,
309
310
int nargs );
310
- extern void _Py_Specialize_CallKw (_PyStackRef callable , _Py_CODEUNIT * instr ,
311
+ PyAPI_FUNC ( void ) _Py_Specialize_CallKw (_PyStackRef callable , _Py_CODEUNIT * instr ,
311
312
int nargs );
312
- extern void _Py_Specialize_BinaryOp (_PyStackRef lhs , _PyStackRef rhs , _Py_CODEUNIT * instr ,
313
+ PyAPI_FUNC ( void ) _Py_Specialize_BinaryOp (_PyStackRef lhs , _PyStackRef rhs , _Py_CODEUNIT * instr ,
313
314
int oparg , _PyStackRef * locals );
314
- extern void _Py_Specialize_CompareOp (_PyStackRef lhs , _PyStackRef rhs ,
315
+ PyAPI_FUNC ( void ) _Py_Specialize_CompareOp (_PyStackRef lhs , _PyStackRef rhs ,
315
316
_Py_CODEUNIT * instr , int oparg );
316
- extern void _Py_Specialize_UnpackSequence (_PyStackRef seq , _Py_CODEUNIT * instr ,
317
+ PyAPI_FUNC ( void ) _Py_Specialize_UnpackSequence (_PyStackRef seq , _Py_CODEUNIT * instr ,
317
318
int oparg );
318
- extern void _Py_Specialize_ForIter (_PyStackRef iter , _PyStackRef null_or_index , _Py_CODEUNIT * instr , int oparg );
319
- extern void _Py_Specialize_Send (_PyStackRef receiver , _Py_CODEUNIT * instr );
320
- extern void _Py_Specialize_ToBool (_PyStackRef value , _Py_CODEUNIT * instr );
321
- extern void _Py_Specialize_ContainsOp (_PyStackRef value , _Py_CODEUNIT * instr );
322
- extern void _Py_GatherStats_GetIter (_PyStackRef iterable );
319
+ PyAPI_FUNC ( void ) _Py_Specialize_ForIter (_PyStackRef iter , _PyStackRef null_or_index , _Py_CODEUNIT * instr , int oparg );
320
+ PyAPI_FUNC ( void ) _Py_Specialize_Send (_PyStackRef receiver , _Py_CODEUNIT * instr );
321
+ PyAPI_FUNC ( void ) _Py_Specialize_ToBool (_PyStackRef value , _Py_CODEUNIT * instr );
322
+ PyAPI_FUNC ( void ) _Py_Specialize_ContainsOp (_PyStackRef value , _Py_CODEUNIT * instr );
323
+ PyAPI_FUNC ( void ) _Py_GatherStats_GetIter (_PyStackRef iterable );
323
324
324
325
// Utility functions for reading/writing 32/64-bit values in the inline caches.
325
326
// Great care should be taken to ensure that these functions remain correct and
@@ -514,7 +515,7 @@ typedef struct {
514
515
515
516
#define COMPARISON_NOT_EQUALS (COMPARISON_UNORDERED | COMPARISON_LESS_THAN | COMPARISON_GREATER_THAN)
516
517
517
- extern int _Py_Instrument (PyCodeObject * co , PyInterpreterState * interp );
518
+ PyAPI_FUNC ( int ) _Py_Instrument (PyCodeObject * co , PyInterpreterState * interp );
518
519
519
520
extern _Py_CODEUNIT _Py_GetBaseCodeUnit (PyCodeObject * code , int offset );
520
521
0 commit comments