Skip to content

Commit

Permalink
Re-apply orjson patches on top of vendored code.
Browse files Browse the repository at this point in the history
  • Loading branch information
obi1kenobi committed Jan 15, 2025
1 parent 960b2d9 commit 1c02143
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
10 changes: 5 additions & 5 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions vendor/pyo3-info.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
cloned from commit a42e53e888227724928c7f370cad47153a13b329
cloned from commit f2a8460559d8f58269f306679fc58c9d101f70cf (tag: v0.23.4)

then apply diff:

diff --git a/pyo3-ffi/src/modsupport.rs b/pyo3-ffi/src/modsupport.rs
diff --git a/vendor/pyo3/pyo3-ffi/src/modsupport.rs b/vendor/pyo3/pyo3-ffi/src/modsupport.rs
index 4a18d30f..6da2795b 100644
--- a/pyo3-ffi/src/modsupport.rs
+++ b/pyo3-ffi/src/modsupport.rs
--- a/vendor/pyo3/pyo3-ffi/src/modsupport.rs
+++ b/vendor/pyo3/pyo3-ffi/src/modsupport.rs
@@ -36,6 +36,13 @@ extern "C" {
pub fn Py_BuildValue(arg1: *const c_char, ...) -> *mut PyObject;
// skipped Py_VaBuildValue
Expand All @@ -20,11 +20,11 @@ index 4a18d30f..6da2795b 100644
#[cfg(Py_3_10)]
#[cfg_attr(PyPy, link_name = "PyPyModule_AddObjectRef")]
pub fn PyModule_AddObjectRef(
diff --git a/pyo3-ffi/src/object.rs b/pyo3-ffi/src/object.rs
index fc3484be..d2fa1930 100644
--- a/pyo3-ffi/src/object.rs
+++ b/pyo3-ffi/src/object.rs
@@ -211,7 +211,7 @@ pub unsafe fn Py_SIZE(ob: *mut PyObject) -> Py_ssize_t {
diff --git a/vendor/pyo3/pyo3-ffi/src/object.rs b/vendor/pyo3/pyo3-ffi/src/object.rs
index 3f086ac1..51083a8e 100644
--- a/vendor/pyo3/pyo3-ffi/src/object.rs
+++ b/vendor/pyo3/pyo3-ffi/src/object.rs
@@ -214,7 +214,7 @@ pub unsafe fn Py_SIZE(ob: *mut PyObject) -> Py_ssize_t {

#[inline(always)]
#[cfg(all(Py_3_12, not(Py_GIL_DISABLED)))]
Expand Down
7 changes: 7 additions & 0 deletions vendor/pyo3/pyo3-ffi/src/modsupport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ extern "C" {
pub fn Py_BuildValue(arg1: *const c_char, ...) -> *mut PyObject;
// skipped Py_VaBuildValue

#[cfg(Py_3_13)]
pub fn PyModule_Add(
module: *mut PyObject,
name: *const c_char,
value: *mut PyObject,
) -> core::ffi::c_int;

#[cfg(Py_3_10)]
#[cfg_attr(PyPy, link_name = "PyPyModule_AddObjectRef")]
pub fn PyModule_AddObjectRef(
Expand Down
2 changes: 1 addition & 1 deletion vendor/pyo3/pyo3-ffi/src/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ pub unsafe fn Py_SIZE(ob: *mut PyObject) -> Py_ssize_t {

#[inline(always)]
#[cfg(all(Py_3_12, not(Py_GIL_DISABLED)))]
unsafe fn _Py_IsImmortal(op: *mut PyObject) -> c_int {
pub unsafe fn _Py_IsImmortal(op: *mut PyObject) -> c_int {
#[cfg(target_pointer_width = "64")]
{
(((*op).ob_refcnt.ob_refcnt as crate::PY_INT32_T) < 0) as c_int
Expand Down

0 comments on commit 1c02143

Please sign in to comment.