Skip to content

Commit

Permalink
gate PyUnstable_PerfTrampoline_CompileCode under appropriate ifdefs
Browse files Browse the repository at this point in the history
  • Loading branch information
czardoz committed Oct 27, 2023
1 parent 6c3fe05 commit c6cf583
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Python/perf_trampoline.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ compile_trampoline(void)

int PyUnstable_PerfTrampoline_CompileCode(PyCodeObject *co)
{
#ifdef PY_HAVE_PERF_TRAMPOLINE
py_trampoline f = NULL;
assert(extra_code_index != -1);
int ret = _PyCode_GetExtra((PyObject *)co, extra_code_index, (void **)&f);
Expand All @@ -343,6 +344,7 @@ int PyUnstable_PerfTrampoline_CompileCode(PyCodeObject *co)
return _PyCode_SetExtra((PyObject *)co, extra_code_index,
(void *)new_trampoline);
}
#endif // PY_HAVE_PERF_TRAMPOLINE
return 0;
}

Expand Down

0 comments on commit c6cf583

Please sign in to comment.