Skip to content

Several CAPI tests include <stddef.h> for no reason #110549

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sobolevn opened this issue Oct 9, 2023 · 0 comments
Closed

Several CAPI tests include <stddef.h> for no reason #110549

sobolevn opened this issue Oct 9, 2023 · 0 comments
Assignees
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@sobolevn
Copy link
Member

sobolevn commented Oct 9, 2023

Bug report

These files do not use offset or ptrdiff_t that some files use:

diff --git Modules/_testcapi/abstract.c Modules/_testcapi/abstract.c
index 81a3dea4c1d..a93477a7090 100644
--- Modules/_testcapi/abstract.c
+++ Modules/_testcapi/abstract.c
@@ -1,5 +1,3 @@
-#include <stddef.h>               // ptrdiff_t
-
 #include "parts.h"
 #include "util.h"
 
diff --git Modules/_testcapi/dict.c Modules/_testcapi/dict.c
index 810989fbed8..5f6a1a037dc 100644
--- Modules/_testcapi/dict.c
+++ Modules/_testcapi/dict.c
@@ -1,5 +1,3 @@
-#include <stddef.h>               // ptrdiff_t
-
 #include "parts.h"
 #include "util.h"
 
diff --git Modules/_testcapi/set.c Modules/_testcapi/set.c
index f68a1859698..35e686e1e29 100644
--- Modules/_testcapi/set.c
+++ Modules/_testcapi/set.c
@@ -1,5 +1,3 @@
-#include <stddef.h>               // ptrdiff_t
-
 #include "parts.h"
 #include "util.h"
 

I suggest removing them.

Linked PRs

@sobolevn sobolevn added type-bug An unexpected behavior, bug, or error tests Tests in the Lib/test dir labels Oct 9, 2023
@sobolevn sobolevn self-assigned this Oct 9, 2023
sobolevn added a commit to sobolevn/cpython that referenced this issue Oct 9, 2023
serhiy-storchaka pushed a commit to serhiy-storchaka/cpython that referenced this issue Oct 9, 2023
…capi (pythonGH-110552).

(cherry picked from commit 89df5b7)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
serhiy-storchaka pushed a commit to serhiy-storchaka/cpython that referenced this issue Oct 9, 2023
…capi (pythonGH-110552).

(cherry picked from commit 89df5b7)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
serhiy-storchaka pushed a commit to serhiy-storchaka/cpython that referenced this issue Oct 9, 2023
…capi (pythonGH-110552).

(cherry picked from commit 89df5b7)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
serhiy-storchaka added a commit that referenced this issue Oct 9, 2023
…H-110552) (GH-110553)

(cherry picked from commit 89df5b7)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@sobolevn sobolevn closed this as completed Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant