-
Notifications
You must be signed in to change notification settings - Fork 760
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update
complexobject.rs
for 3.13 (#4521)
- Loading branch information
1 parent
3cfa04f
commit 3496f49
Showing
4 changed files
with
36 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Remove private FFI definitions `_Py_c_sum`, `_Py_c_diff`, `_Py_c_neg`, `_Py_c_prod`, `_Py_c_quot`, `_Py_c_pow`, `_Py_c_abs`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
use crate::PyObject; | ||
use std::os::raw::c_double; | ||
|
||
#[repr(C)] | ||
#[derive(Copy, Clone)] | ||
pub struct Py_complex { | ||
pub real: c_double, | ||
pub imag: c_double, | ||
} | ||
|
||
// skipped private function _Py_c_sum | ||
// skipped private function _Py_c_diff | ||
// skipped private function _Py_c_neg | ||
// skipped private function _Py_c_prod | ||
// skipped private function _Py_c_quot | ||
// skipped private function _Py_c_pow | ||
// skipped private function _Py_c_abs | ||
|
||
#[repr(C)] | ||
pub struct PyComplexObject { | ||
pub ob_base: PyObject, | ||
#[cfg(not(GraalPy))] | ||
pub cval: Py_complex, | ||
} | ||
|
||
extern "C" { | ||
#[cfg_attr(PyPy, link_name = "PyPyComplex_FromCComplex")] | ||
pub fn PyComplex_FromCComplex(v: Py_complex) -> *mut PyObject; | ||
#[cfg_attr(PyPy, link_name = "PyPyComplex_AsCComplex")] | ||
pub fn PyComplex_AsCComplex(op: *mut PyObject) -> Py_complex; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters