mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Merged revisions 84810 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84810 | daniel.stutzbach | 2010-09-14 11:02:01 -0500 (Tue, 14 Sep 2010) | 1 line Remove pointers to a FAQ entry that no longer exists. Incorporate some text from the old FAQ into the docs ........
This commit is contained in:
parent
5974cdd5f5
commit
bd63a9976d
2 changed files with 11 additions and 10 deletions
|
@ -171,7 +171,9 @@ If your module creates a new type, you may have trouble with this line::
|
||||||
|
|
||||||
PyVarObject_HEAD_INIT(&PyType_Type, 0)
|
PyVarObject_HEAD_INIT(&PyType_Type, 0)
|
||||||
|
|
||||||
Change it to::
|
Static type object initializers in extension modules may cause
|
||||||
|
compiles to fail with an error message like "initializer not a
|
||||||
|
constant". This shows up when building DLL under MSVC. Change it to::
|
||||||
|
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
|
|
||||||
|
@ -179,8 +181,6 @@ and add the following to the module initialization function::
|
||||||
|
|
||||||
MyObject_Type.ob_type = &PyType_Type;
|
MyObject_Type.ob_type = &PyType_Type;
|
||||||
|
|
||||||
Refer to section 3 of the `Python FAQ <http://www.python.org/doc/faq>`_ for
|
|
||||||
details on why you must do this.
|
|
||||||
|
|
||||||
|
|
||||||
.. _dynamic-linking:
|
.. _dynamic-linking:
|
||||||
|
|
|
@ -674,7 +674,8 @@ extern pid_t forkpty(int *, char *, struct termios *, struct winsize *);
|
||||||
/* Building an extension module, or an embedded situation */
|
/* Building an extension module, or an embedded situation */
|
||||||
/* public Python functions and data are imported */
|
/* public Python functions and data are imported */
|
||||||
/* Under Cygwin, auto-import functions to prevent compilation */
|
/* Under Cygwin, auto-import functions to prevent compilation */
|
||||||
/* failures similar to http://python.org/doc/FAQ.html#3.24 */
|
/* failures similar to those described at the bottom of 4.1: */
|
||||||
|
/* http://docs.python.org/extending/windows.html#a-cookbook-approach */
|
||||||
# if !defined(__CYGWIN__)
|
# if !defined(__CYGWIN__)
|
||||||
# define PyAPI_FUNC(RTYPE) __declspec(dllimport) RTYPE
|
# define PyAPI_FUNC(RTYPE) __declspec(dllimport) RTYPE
|
||||||
# endif /* !__CYGWIN__ */
|
# endif /* !__CYGWIN__ */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue