https://github.com/python/cpython/commit/e12a6780bbb607fce6ecf0ffe4260e5a944676c1
commit: e12a6780bbb607fce6ecf0ffe4260e5a944676c1
branch: main
author: neonene <[email protected]>
committer: encukou <[email protected]>
date: 2024-05-22T20:30:41Z
summary:

gh-117142: ctypes: Clean up c-analyzer .tsv files (GH-117544)


Co-authored-by: Petr Viktorin <[email protected]>

files:
M Modules/_ctypes/ctypes.h
M Tools/c-analyzer/cpython/globals-to-fix.tsv
M Tools/c-analyzer/cpython/ignored.tsv

diff --git a/Modules/_ctypes/ctypes.h b/Modules/_ctypes/ctypes.h
index 20c68134be2804..7784020e9af45a 100644
--- a/Modules/_ctypes/ctypes.h
+++ b/Modules/_ctypes/ctypes.h
@@ -427,14 +427,8 @@ struct basespec {
     char *adr;
 };
 
-extern char basespec_string[];
-
 extern ffi_type *_ctypes_get_ffi_type(ctypes_state *st, PyObject *obj);
 
-extern char *_ctypes_conversion_encoding;
-extern char *_ctypes_conversion_errors;
-
-
 extern void _ctypes_free_closure(void *);
 extern void *_ctypes_alloc_closure(void);
 
diff --git a/Tools/c-analyzer/cpython/globals-to-fix.tsv 
b/Tools/c-analyzer/cpython/globals-to-fix.tsv
index 1b8cccf80872c8..8b6fe94e3afc52 100644
--- a/Tools/c-analyzer/cpython/globals-to-fix.tsv
+++ b/Tools/c-analyzer/cpython/globals-to-fix.tsv
@@ -354,37 +354,6 @@ Modules/_testclinic.c      -       TestClass       -
 ##-----------------------
 ## static types
 
-Modules/_ctypes/_ctypes.c      -       PyCArrayType_Type       -
-Modules/_ctypes/_ctypes.c      -       PyCArray_Type   -
-Modules/_ctypes/_ctypes.c      -       PyCData_Type    -
-Modules/_ctypes/_ctypes.c      -       PyCFuncPtrType_Type     -
-Modules/_ctypes/_ctypes.c      -       PyCFuncPtr_Type -
-Modules/_ctypes/_ctypes.c      -       PyCPointerType_Type     -
-Modules/_ctypes/_ctypes.c      -       PyCPointer_Type -
-Modules/_ctypes/_ctypes.c      -       PyCSimpleType_Type      -
-Modules/_ctypes/_ctypes.c      -       PyCStructType_Type      -
-Modules/_ctypes/_ctypes.c      -       Simple_Type     -
-Modules/_ctypes/_ctypes.c      -       Struct_Type     -
-Modules/_ctypes/_ctypes.c      -       UnionType_Type  -
-Modules/_ctypes/_ctypes.c      -       Union_Type      -
-Modules/_ctypes/callproc.c     -       PyCArg_Type     -
-Modules/_ctypes/ctypes.h       -       PyCArg_Type     -
-Modules/_ctypes/ctypes.h       -       PyCArrayType_Type       -
-Modules/_ctypes/ctypes.h       -       PyCArray_Type   -
-Modules/_ctypes/ctypes.h       -       PyCData_Type    -
-Modules/_ctypes/ctypes.h       -       PyCFuncPtrType_Type     -
-Modules/_ctypes/ctypes.h       -       PyCFuncPtr_Type -
-Modules/_ctypes/ctypes.h       -       PyCPointerType_Type     -
-Modules/_ctypes/ctypes.h       -       PyCPointer_Type -
-Modules/_ctypes/ctypes.h       -       PyCSimpleType_Type      -
-Modules/_ctypes/ctypes.h       -       PyCStgDict_Type -
-Modules/_ctypes/ctypes.h       -       PyCStructType_Type      -
-Modules/_ctypes/ctypes.h       -       PyExc_ArgError  -
-Modules/_ctypes/ctypes.h       -       _ctypes_conversion_encoding     -
-Modules/_ctypes/ctypes.h       -       _ctypes_conversion_errors       -
-Modules/_ctypes/ctypes.h       -       _ctypes_ptrtype_cache   -
-Modules/_ctypes/ctypes.h       -       basespec_string -
-Modules/_ctypes/stgdict.c      -       PyCStgDict_Type -
 Modules/_cursesmodule.c        -       PyCursesWindow_Type     -
 Modules/_datetimemodule.c      -       PyDateTime_DateTimeType -
 Modules/_datetimemodule.c      -       PyDateTime_DateType     -
@@ -410,32 +379,19 @@ Modules/_tkinter.c        -       Tktt_Type       -
 Modules/xxlimited_35.c -       Xxo_Type        -
 
 ## exception types
-Modules/_ctypes/_ctypes.c      -       PyExc_ArgError  -
 Modules/_cursesmodule.c        -       PyCursesError   -
 Modules/_tkinter.c     -       Tkinter_TclError        -
 Modules/xxlimited_35.c -       ErrorObject     -
 Modules/xxmodule.c     -       ErrorObject     -
 
-##-----------------------
-## cached - initialized once
-
-## manually cached PyUnicodeOjbect
-Modules/_ctypes/callproc.c     _ctypes_get_errobj      error_object_name       
-
-Modules/_ctypes/_ctypes.c      CreateSwappedType       swapped_suffix  -
-
 ##-----------------------
 ## other
 
 ## initialized once
-Modules/_ctypes/_ctypes.c      -       _unpickle       -
-Modules/_ctypes/_ctypes.c      PyCArrayType_from_ctype array_cache     -
 Modules/_cursesmodule.c        -       ModDict -
 Modules/_datetimemodule.c      datetime_strptime       module  -
 
 ## state
-Modules/_ctypes/_ctypes.c      -       _ctypes_ptrtype_cache   -
-Modules/_ctypes/_ctypes.c      -       global_state    -
-Modules/_ctypes/ctypes.h       -       global_state    -
 Modules/_datetimemodule.c      -       _datetime_global_state  -
 Modules/_tkinter.c     -       tcl_lock        -
 Modules/_tkinter.c     -       excInCmd        -
diff --git a/Tools/c-analyzer/cpython/ignored.tsv 
b/Tools/c-analyzer/cpython/ignored.tsv
index a1c1553d8ddc10..a3bdf0396fd3e1 100644
--- a/Tools/c-analyzer/cpython/ignored.tsv
+++ b/Tools/c-analyzer/cpython/ignored.tsv
@@ -395,8 +395,6 @@ Python/optimizer.c  -       cold_exits_initialized  -
 ##-----------------------
 ## test code
 
-Modules/_ctypes/_ctypes_test.c -       _ctypes_test_slots      -
-Modules/_ctypes/_ctypes_test.c -       _ctypes_testmodule      -
 Modules/_ctypes/_ctypes_test.c -       _xxx_lib        -
 Modules/_ctypes/_ctypes_test.c -       an_integer      -
 Modules/_ctypes/_ctypes_test.c -       bottom  -
@@ -404,7 +402,6 @@ Modules/_ctypes/_ctypes_test.c      -       last_tf_arg_s   
-
 Modules/_ctypes/_ctypes_test.c -       last_tf_arg_u   -
 Modules/_ctypes/_ctypes_test.c -       last_tfrsuv_arg -
 Modules/_ctypes/_ctypes_test.c -       left    -
-Modules/_ctypes/_ctypes_test.c -       module_methods  -
 Modules/_ctypes/_ctypes_test.c -       my_eggs -
 Modules/_ctypes/_ctypes_test.c -       my_spams        -
 Modules/_ctypes/_ctypes_test.c -       right   -

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to