Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0f1d42a

Browse files
authored
prepare for pypy3.11 release (#123)
1 parent03e441d commit0f1d42a

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

‎pythoncapi_compat.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ PyFrame_GetVarString(PyFrameObject *frame, const char *name)
287287

288288

289289
// bpo-39947 added PyThreadState_GetInterpreter() to Python 3.9.0a5
290-
#if PY_VERSION_HEX < 0x030900A5 || defined(PYPY_VERSION)
290+
#if PY_VERSION_HEX < 0x030900A5 ||(defined(PYPY_VERSION) && PY_VERSION_HEX < 0x030B0000)
291291
staticinline PyInterpreterState *
292292
PyThreadState_GetInterpreter(PyThreadState *tstate)
293293
{
@@ -918,7 +918,7 @@ static inline int
918918
PyObject_VisitManagedDict(PyObject *obj, visitproc visit,void *arg)
919919
{
920920
PyObject **dict =_PyObject_GetDictPtr(obj);
921-
if (*dict ==NULL) {
921+
if (dict ==NULL ||*dict ==NULL) {
922922
return -1;
923923
}
924924
Py_VISIT(*dict);
@@ -929,7 +929,7 @@ static inline void
929929
PyObject_ClearManagedDict(PyObject *obj)
930930
{
931931
PyObject **dict =_PyObject_GetDictPtr(obj);
932-
if (*dict ==NULL) {
932+
if (dict ==NULL ||*dict ==NULL) {
933933
return;
934934
}
935935
Py_CLEAR(*dict);

‎runtests.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
importargparse
1414
importos.path
1515
importshutil
16-
importsubprocess
1716
importsys
1817
try:
1918
fromshutilimportwhich

‎tests/test_pythoncapi_compat_cext.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ test_import(PyObject *Py_UNUSED(module), PyObject *Py_UNUSED(args))
758758
staticvoid
759759
gc_collect(void)
760760
{
761-
#if defined(PYPY_VERSION)
761+
#if defined(PYPY_VERSION)&&PY_VERSION_HEX<0x030B0000
762762
PyObject*mod=PyImport_ImportModule("gc");
763763
assert(mod!=_Py_NULL);
764764

@@ -1432,8 +1432,8 @@ test_long_api(PyObject *Py_UNUSED(module), PyObject *Py_UNUSED(args))
14321432

14331433
// --- HeapCTypeWithManagedDict --------------------------------------------
14341434

1435-
// Py_TPFLAGS_MANAGED_DICT was added to Python 3.11.0a3
1436-
#ifPY_VERSION_HEX >=0x030B00A3
1435+
// Py_TPFLAGS_MANAGED_DICT was added to Python 3.11.0a3 but is not implemented on PyPy
1436+
#ifPY_VERSION_HEX >=0x030B00A3&& ! defined(PYPY_VERSION)
14371437
# defineTEST_MANAGED_DICT
14381438

14391439
typedefstruct {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp