New submission from Shreyan Avigyan :
In the example code of the Extending Python with C/C++ documentation the pmodule variable (that stores the return value of PyImport_ImportModule) was never declared. The PR(s) attached to this issue fixes it by declaring and initializing the pmodule variable. This issue is common in all the documentation versions. The first PR will be for documentation version 3.10. If it's accepted then I would request other developers to submit PRs for documentation 3.9, 3.8, 3.7 and 3.6 because I'm having a problem switching to those branches (I'm continuously facing the problem "HEAD detached" if I switch to those branches).
Thanking you
With Regards
----------
assignee: docs@python
components: Documentation
messages: 390281
nosy: docs@python, shreyanavigyan
priority: normal
severity: normal
status: open
title: Fixing the example code in Doc/extending/extending.rst to declare and initialize the pmodule variable to be of the right type.
type: compile error
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9
_______________________________________
Python tracker
https://bugs.python.org/issue43739
_______________________________________