[Python-checkins] r68269 - in python/branches/release30-maint: Doc/library/threading.rst Objects/moduleobject.c PC/example_nt/example.c

georg.brandl python-checkins at python.org
Sun Jan 4 00:57:38 CET 2009


Author: georg.brandl
Date: Sun Jan  4 00:57:38 2009
New Revision: 68269

Log:
Merged revisions 68169-68170 via svnmerge from 
svn+ssh://svn.python.org/python/branches/py3k

........
  r68169 | georg.brandl | 2009-01-02 20:20:26 +0100 (Fri, 02 Jan 2009) | 2 lines
  
  Remove traces of Py_InitModule*.
........
  r68170 | georg.brandl | 2009-01-02 21:10:05 +0100 (Fri, 02 Jan 2009) | 2 lines
  
  #4808: move old API below new API doc.
........


Modified:
   python/branches/release30-maint/   (props changed)
   python/branches/release30-maint/Doc/library/threading.rst
   python/branches/release30-maint/Objects/moduleobject.c
   python/branches/release30-maint/PC/example_nt/example.c

Modified: python/branches/release30-maint/Doc/library/threading.rst
==============================================================================
--- python/branches/release30-maint/Doc/library/threading.rst	(original)
+++ python/branches/release30-maint/Doc/library/threading.rst	Sun Jan  4 00:57:38 2009
@@ -278,12 +278,6 @@
    raises the same exception.
 
 
-.. method:: Thread.getName()
-            Thread.setName()
-
-   Old API for :attr:`~Thread.name`.
-
-
 .. attribute:: Thread.name
 
    A string used for identification purposes only. It has no semantics.
@@ -291,6 +285,13 @@
    constructor.
 
 
+.. method:: Thread.getName()
+            Thread.setName()
+
+   Old getter/setter API for :attr:`~Thread.name`; use it directly as a property
+   instead.
+
+
 .. attribute:: Thread.ident
 
    The 'thread identifier' of this thread or ``None`` if the thread has not been
@@ -309,12 +310,6 @@
    returns a list of all alive threads.
 
 
-.. method:: Thread.isDaemon()
-            Thread.setDaemon()
-
-   Old API for :attr:`~Thread.daemon`.
-
-
 .. attribute:: Thread.daemon
 
    The thread's daemon flag. This must be set before :meth:`start` is called,
@@ -325,6 +320,13 @@
    The entire Python program exits when no alive non-daemon threads are left.
 
 
+.. method:: Thread.isDaemon()
+            Thread.setDaemon()
+
+   Old getter/setter API for :attr:`~Thread.daemon`; use it directly as a
+   property instead.
+
+
 .. _lock-objects:
 
 Lock Objects

Modified: python/branches/release30-maint/Objects/moduleobject.c
==============================================================================
--- python/branches/release30-maint/Objects/moduleobject.c	(original)
+++ python/branches/release30-maint/Objects/moduleobject.c	Sun Jan  4 00:57:38 2009
@@ -91,9 +91,9 @@
 
 	   This is a bit of a hack: when the shared library is loaded,
 	   the module name is "package.module", but the module calls
-	   Py_InitModule*() with just "module" for the name.  The shared
+	   PyModule_Create*() with just "module" for the name.  The shared
 	   library loader squirrels away the true name of the module in
-	   _Py_PackageContext, and Py_InitModule*() will substitute this
+	   _Py_PackageContext, and PyModule_Create*() will substitute this
 	   (if the name actually matches).
 	*/
 	if (_Py_PackageContext != NULL) {

Modified: python/branches/release30-maint/PC/example_nt/example.c
==============================================================================
--- python/branches/release30-maint/PC/example_nt/example.c	(original)
+++ python/branches/release30-maint/PC/example_nt/example.c	Sun Jan  4 00:57:38 2009
@@ -13,8 +13,20 @@
 	{NULL, NULL}
 };
 
+static struct PyModuleDef examplemodule = {
+	PyModuleDef_HEAD_INIT,
+	"example",
+	"example module doc string",
+	-1,
+	example_methods,
+	NULL,
+	NULL,
+	NULL,
+	NULL
+};
+
 PyMODINIT_FUNC
-initexample(void)
+PyInit_example(void)
 {
-	Py_InitModule("example", example_methods);
+	return PyModule_Create(&examplemodule);
 }


More information about the Python-checkins mailing list