@@ -161,24 +161,11 @@ class VirtualPyObject : public PyObject {
161161
162162int  VirtualPyObject::instance_count = 0 ;
163163
164- //  Converting from function pointer to void* has undefined behavior, but
165- //  works on all known platforms, and CPython's module and type slots currently
166- //  need it.
167- //  (GCC doesn't have a narrower category for this than -Wpedantic.)
168- _Py_COMP_DIAG_PUSH
169- #if  defined(__GNUC__)
170- #pragma  GCC diagnostic ignored "-Wpedantic"
171- #elif  defined(__clang__)
172- #pragma  clang diagnostic ignored "-Wpedantic"
173- #endif 
174- 
175164PyType_Slot VirtualPyObject_Slots[] = {
176165    {Py_tp_free, (void *)VirtualPyObject::dealloc},
177166    {0 , _Py_NULL},
178167};
179168
180- _Py_COMP_DIAG_POP
181- 
182169PyType_Spec VirtualPyObject_Spec = {
183170    /*  .name */ STR (MODULE_NAME) " .VirtualPyObject" 
184171    /*  .basicsize */ sizeof (VirtualPyObject),
@@ -254,20 +241,11 @@ _testcppext_exec(PyObject *module)
254241    return  0 ;
255242}
256243
257- //  Need to ignore "-Wpedantic" warnings; see VirtualPyObject_Slots above
258- _Py_COMP_DIAG_PUSH
259- #if  defined(__GNUC__)
260- #pragma  GCC diagnostic ignored "-Wpedantic"
261- #elif  defined(__clang__)
262- #pragma  clang diagnostic ignored "-Wpedantic"
263- #endif 
264- 
265244static  PyModuleDef_Slot _testcppext_slots[] = {
266245    {Py_mod_exec, reinterpret_cast <void *>(_testcppext_exec)},
267246    {0 , _Py_NULL}
268247};
269248
270- _Py_COMP_DIAG_POP
271249
272250PyDoc_STRVAR (_testcppext_doc, " C++ test extension." 
273251
0 commit comments