[Python-checkins] r84810 - in python/branches/py3k: Doc/extending/windows.rst Include/pyport.h

daniel.stutzbach python-checkins at python.org
Tue Sep 14 18:02:01 CEST 2010


Author: daniel.stutzbach
Date: Tue Sep 14 18:02:01 2010
New Revision: 84810

Log:
Remove pointers to a FAQ entry that no longer exists.  Incorporate some text from the old FAQ into the docs

Modified:
   python/branches/py3k/Doc/extending/windows.rst
   python/branches/py3k/Include/pyport.h

Modified: python/branches/py3k/Doc/extending/windows.rst
==============================================================================
--- python/branches/py3k/Doc/extending/windows.rst	(original)
+++ python/branches/py3k/Doc/extending/windows.rst	Tue Sep 14 18:02:01 2010
@@ -171,7 +171,9 @@
 
    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)
 
@@ -179,8 +181,6 @@
 
    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:

Modified: python/branches/py3k/Include/pyport.h
==============================================================================
--- python/branches/py3k/Include/pyport.h	(original)
+++ python/branches/py3k/Include/pyport.h	Tue Sep 14 18:02:01 2010
@@ -695,23 +695,24 @@
 #               ifdef Py_BUILD_CORE
 #                       define PyAPI_FUNC(RTYPE) __declspec(dllexport) RTYPE
 #                       define PyAPI_DATA(RTYPE) extern __declspec(dllexport) RTYPE
-            /* module init functions inside the core need no external linkage */
-            /* except for Cygwin to handle embedding */
+        /* module init functions inside the core need no external linkage */
+        /* except for Cygwin to handle embedding */
 #                       if defined(__CYGWIN__)
 #                               define PyMODINIT_FUNC __declspec(dllexport) PyObject*
 #                       else /* __CYGWIN__ */
 #                               define PyMODINIT_FUNC PyObject*
 #                       endif /* __CYGWIN__ */
 #               else /* Py_BUILD_CORE */
-            /* Building an extension module, or an embedded situation */
-            /* public Python functions and data are imported */
-            /* Under Cygwin, auto-import functions to prevent compilation */
-            /* failures similar to http://python.org/doc/FAQ.html#3.24 */
+        /* Building an extension module, or an embedded situation */
+        /* public Python functions and data are imported */
+        /* Under Cygwin, auto-import functions to prevent compilation */
+        /* failures similar to those described at the bottom of 4.1: */
+        /* http://docs.python.org/extending/windows.html#a-cookbook-approach */
 #                       if !defined(__CYGWIN__)
 #                               define PyAPI_FUNC(RTYPE) __declspec(dllimport) RTYPE
 #                       endif /* !__CYGWIN__ */
 #                       define PyAPI_DATA(RTYPE) extern __declspec(dllimport) RTYPE
-            /* module init functions outside the core must be exported */
+        /* module init functions outside the core must be exported */
 #                       if defined(__cplusplus)
 #                               define PyMODINIT_FUNC extern "C" __declspec(dllexport) PyObject*
 #                       else /* __cplusplus */


More information about the Python-checkins mailing list