[PATCH] fix build failure with Python 3.7

Pedro Alves palves@redhat.com
Fri Jun 1 12:16:00 GMT 2018


On 05/31/2018 09:45 PM, Paul.Koning@dell.com wrote:

>>> @@ -1667,6 +1667,14 @@ finalize_python (void *ignore)
>>>   restore_active_ext_lang (previous_active);
>>> }
>>>
>>> +#ifdef IS_PY3K
>>> +PyMODINIT_FUNC
>>> +PyInit__gdb (void)
>>> +{
>>> +  return PyModule_Create (&python_GdbModuleDef);
>>> +}
>>> +#endif
>>
>> I think it's a good idea to add a comment to this function.
> 
> I added this (after the #ifdef):
> 
> /* This is called via the PyImport_AppendInittab mechanism called
>    during initialization, to make the built-in _gdb module known to
>    Python.  */

Can the function be made static?

I'm a little surprised to see the function being named "Py...", since
that kind of looks like stepping in Python's namespace.

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list