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

Commitc21f2bd

Browse files
gh-93442: Add test for _Py_CAST(nullptr). (gh-93505) (gh-93509)
(cherry picked from commit713eb18)Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
1 parentd97e2c5 commitc21f2bd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎Lib/test/_testcppext.cpp‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ test_api_casts(PyObject *Py_UNUSED(module), PyObject *Py_UNUSED(args))
7777
// gh-93442: Pass 0 as NULL for PyObject*
7878
Py_XINCREF(0);
7979
Py_XDECREF(0);
80+
// ensure that nullptr works too
81+
Py_XINCREF(nullptr);
82+
Py_XDECREF(nullptr);
8083

8184
Py_DECREF(obj);
8285
Py_RETURN_NONE;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp