Skip to content

Commit

Permalink
ffi: remove eval.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed May 11, 2022
1 parent 76c09ac commit 10b0929
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 29 deletions.
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

0 comments on commit 10b0929

Please sign in to comment.