summaryrefslogtreecommitdiffstats
path: root/Include/internal/pycore_code.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/internal/pycore_code.h')
-rw-r--r--Include/internal/pycore_code.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h
index 635d2b2..1c77730 100644
--- a/Include/internal/pycore_code.h
+++ b/Include/internal/pycore_code.h
@@ -482,13 +482,18 @@ adaptive_counter_backoff(_Py_BackoffCounter counter) {
/* Specialization Extensions */
/* callbacks for an external specialization */
+
+struct _PyBinopSpecializationDescr;
+
typedef int (*binaryopguardfunc)(PyObject *lhs, PyObject *rhs);
-typedef PyObject *(*binaryopactionfunc)(PyObject *lhs, PyObject *rhs);
+typedef PyObject* (*binaryopactionfunc)(PyObject *lhs, PyObject *rhs);
+typedef void (*binaryopfreefunc)(struct _PyBinopSpecializationDescr *descr);
-typedef struct {
+typedef struct _PyBinopSpecializationDescr {
int oparg;
binaryopguardfunc guard;
binaryopactionfunc action;
+ binaryopfreefunc free;
} _PyBinaryOpSpecializationDescr;
/* Comparison bit masks. */