GH-104584: Allow optimizers to opt out of optimizing. (GH-105244)

This commit is contained in:
Mark Shannon 2023-06-05 09:44:23 +01:00 committed by GitHub
parent 9efaff5fd3
commit e8ecb9ee6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 12 deletions

View file

@ -21,7 +21,8 @@ typedef struct _PyExecutorObject {
typedef struct _PyOptimizerObject _PyOptimizerObject;
typedef _PyExecutorObject *(*optimize_func)(_PyOptimizerObject* self, PyCodeObject *code, _Py_CODEUNIT *instr);
/* Should return > 0 if a new executor is created. O if no executor is produced and < 0 if an error occurred. */
typedef int (*optimize_func)(_PyOptimizerObject* self, PyCodeObject *code, _Py_CODEUNIT *instr, _PyExecutorObject **);
typedef struct _PyOptimizerObject {
PyObject_HEAD