Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ffi: remove eval.rs #2368

Merged
merged 1 commit into from
May 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Fixed incorrectly disabled FFI definition `PyThreadState_DeleteCurrent`. [#2357](https://github.com/PyO3/pyo3/pull/2357)
- Correct FFI definition `PyEval_EvalCodeEx` to take `*const *mut PyObject` array arguments instead of `*mut *mut PyObject` (this was changed in CPython 3.6). [#2368](https://github.com/PyO3/pyo3/pull/2368)


## [0.16.4] - 2022-04-14
Expand Down
21 changes: 21 additions & 0 deletions pyo3-ffi/src/ceval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,27 @@ use crate::pystate::PyThreadState;
use std::os::raw::{c_char, c_int, c_void};

extern "C" {
#[cfg_attr(PyPy, link_name = "PyPyEval_EvalCode")]
pub fn PyEval_EvalCode(
arg1: *mut PyObject,
arg2: *mut PyObject,
arg3: *mut PyObject,
) -> *mut PyObject;

pub fn PyEval_EvalCodeEx(
co: *mut PyObject,
globals: *mut PyObject,
locals: *mut PyObject,
args: *const *mut PyObject,
argc: c_int,
kwds: *const *mut PyObject,
kwdc: c_int,
defs: *const *mut PyObject,
defc: c_int,
kwdefs: *mut PyObject,
closure: *mut PyObject,
) -> *mut PyObject;

#[cfg_attr(Py_3_9, deprecated(note = "Python 3.9"))]
#[cfg_attr(PyPy, link_name = "PyPyEval_CallObjectWithKeywords")]
pub fn PyEval_CallObjectWithKeywords(
Expand Down
2 changes: 2 additions & 0 deletions pyo3-ffi/src/cpython/ceval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ use crate::object::{freefunc, PyObject};
use std::os::raw::c_int;

extern "C" {
// skipped non-limited _PyEval_CallTracing

pub fn _PyEval_EvalFrameDefault(arg1: *mut crate::PyFrameObject, exc: c_int) -> *mut PyObject;
pub fn _PyEval_RequestCodeExtraIndex(func: freefunc) -> c_int;
pub fn PyEval_SetProfile(trace_func: Option<Py_tracefunc>, arg1: *mut PyObject);
Expand Down
27 changes: 0 additions & 27 deletions pyo3-ffi/src/eval.rs

This file was deleted.

2 changes: 0 additions & 2 deletions pyo3-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ pub use self::datetime::*;
pub use self::descrobject::*;
pub use self::dictobject::*;
pub use self::enumobject::*;
pub use self::eval::*;
pub use self::fileobject::*;
pub use self::fileutils::*;
pub use self::floatobject::*;
Expand Down Expand Up @@ -366,7 +365,6 @@ mod dictobject;
// skipped dynamic_annotations.h
mod enumobject;
// skipped errcode.h
mod eval;
// skipped exports.h
mod fileobject;
mod fileutils;
Expand Down