Commit c7f3cbd0 authored by Guido van Rossum's avatar Guido van Rossum

Get rid of __version__, as Jim recommends. Use $ from docstring instead.

parent 556f03d0
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE. DAMAGE.
$Id: Acquisition.c,v 1.54 2001/12/23 15:12:34 Brian Exp $ $Id: Acquisition.c,v 1.55 2002/01/25 15:34:06 gvanrossum Exp $
If you have questions regarding this software, If you have questions regarding this software,
contact: contact:
...@@ -1527,7 +1527,7 @@ initAcquisition(void) ...@@ -1527,7 +1527,7 @@ initAcquisition(void)
{ {
PyObject *m, *d; PyObject *m, *d;
PyObject *api; PyObject *api;
char *rev="$Revision: 1.54 $";
PURE_MIXIN_CLASS(Acquirer, PURE_MIXIN_CLASS(Acquirer,
"Base class for objects that implicitly" "Base class for objects that implicitly"
" acquire attributes from containers\n" " acquire attributes from containers\n"
...@@ -1546,7 +1546,7 @@ initAcquisition(void) ...@@ -1546,7 +1546,7 @@ initAcquisition(void)
/* Create the module and add the functions */ /* Create the module and add the functions */
m = Py_InitModule4("Acquisition", methods, m = Py_InitModule4("Acquisition", methods,
"Provide base classes for acquiring objects\n\n" "Provide base classes for acquiring objects\n\n"
"$Id: Acquisition.c,v 1.54 2001/12/23 15:12:34 Brian Exp $\n", "$Id: Acquisition.c,v 1.55 2002/01/25 15:34:06 gvanrossum Exp $\n",
OBJECT(NULL),PYTHON_API_VERSION); OBJECT(NULL),PYTHON_API_VERSION);
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
...@@ -1559,10 +1559,6 @@ initAcquisition(void) ...@@ -1559,10 +1559,6 @@ initAcquisition(void)
/* Create aliases */ /* Create aliases */
PyDict_SetItemString(d,"Implicit",OBJECT(&AcquirerType)); PyDict_SetItemString(d,"Implicit",OBJECT(&AcquirerType));
PyDict_SetItemString(d,"Explicit",OBJECT(&ExplicitAcquirerType)); PyDict_SetItemString(d,"Explicit",OBJECT(&ExplicitAcquirerType));
PyDict_SetItemString(d,"__version__",
PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
PyDict_SetItemString(d,"Acquired",Acquired);
AcquisitionCAPI.AQ_Acquire = capi_aq_acquire; AcquisitionCAPI.AQ_Acquire = capi_aq_acquire;
AcquisitionCAPI.AQ_Get = capi_aq_get; AcquisitionCAPI.AQ_Get = capi_aq_get;
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE. DAMAGE.
$Id: ComputedAttribute.c,v 1.5 2001/05/23 18:28:33 shane Exp $ $Id: ComputedAttribute.c,v 1.6 2002/01/25 15:34:06 gvanrossum Exp $
If you have questions regarding this software, If you have questions regarding this software,
contact: contact:
...@@ -136,7 +136,6 @@ void ...@@ -136,7 +136,6 @@ void
initComputedAttribute(void) initComputedAttribute(void)
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.5 $";
UNLESS(ExtensionClassImported) return; UNLESS(ExtensionClassImported) return;
...@@ -146,12 +145,10 @@ initComputedAttribute(void) ...@@ -146,12 +145,10 @@ initComputedAttribute(void)
/* Create the module and add the functions */ /* Create the module and add the functions */
m = Py_InitModule4("ComputedAttribute", methods, m = Py_InitModule4("ComputedAttribute", methods,
"Provide Computed Attributes\n\n" "Provide Computed Attributes\n\n"
"$Id: ComputedAttribute.c,v 1.5 2001/05/23 18:28:33 shane Exp $\n", "$Id: ComputedAttribute.c,v 1.6 2002/01/25 15:34:06 gvanrossum Exp $\n",
OBJECT(NULL),PYTHON_API_VERSION); OBJECT(NULL),PYTHON_API_VERSION);
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
PyExtensionClass_Export(d,"ComputedAttribute",ComputedAttributeType); PyExtensionClass_Export(d,"ComputedAttribute",ComputedAttributeType);
PyDict_SetItemString(d,"__version__",
PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
CHECK_FOR_ERRORS("can't initialize module Acquisition"); CHECK_FOR_ERRORS("can't initialize module Acquisition");
} }
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE. DAMAGE.
$Id: ExtensionClass.c,v 1.49 2001/12/27 22:30:51 fdrake Exp $ $Id: ExtensionClass.c,v 1.50 2002/01/25 15:34:06 gvanrossum Exp $
If you have questions regarding this software, If you have questions regarding this software,
contact: contact:
...@@ -54,7 +54,7 @@ static char ExtensionClass_module_documentation[] = ...@@ -54,7 +54,7 @@ static char ExtensionClass_module_documentation[] =
" - They provide access to unbound methods,\n" " - They provide access to unbound methods,\n"
" - They can be called to create instances.\n" " - They can be called to create instances.\n"
"\n" "\n"
"$Id: ExtensionClass.c,v 1.49 2001/12/27 22:30:51 fdrake Exp $\n" "$Id: ExtensionClass.c,v 1.50 2002/01/25 15:34:06 gvanrossum Exp $\n"
; ;
#include <stdio.h> #include <stdio.h>
...@@ -3519,7 +3519,6 @@ void ...@@ -3519,7 +3519,6 @@ void
initExtensionClass(void) initExtensionClass(void)
{ {
PyObject *m, *d, *s; PyObject *m, *d, *s;
char *rev="$Revision: 1.49 $";
PURE_MIXIN_CLASS(Base, "Minimalbase class for Extension Classes", NULL); PURE_MIXIN_CLASS(Base, "Minimalbase class for Extension Classes", NULL);
PMethodType.ob_type=&PyType_Type; PMethodType.ob_type=&PyType_Type;
...@@ -3534,9 +3533,6 @@ initExtensionClass(void) ...@@ -3534,9 +3533,6 @@ initExtensionClass(void)
(PyObject*)NULL,PYTHON_API_VERSION); (PyObject*)NULL,PYTHON_API_VERSION);
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
s = PyString_FromStringAndSize(rev+11,strlen(rev+11)-2);
PyDict_SetItemString(d,"__version__", s);
Py_XDECREF(s);
init_py_names(); init_py_names();
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE. DAMAGE.
$Id: MethodObject.c,v 1.6 2001/03/28 14:06:51 jeremy Exp $ $Id: MethodObject.c,v 1.7 2002/01/25 15:34:06 gvanrossum Exp $
If you have questions regarding this software, If you have questions regarding this software,
contact: contact:
...@@ -67,7 +67,6 @@ void ...@@ -67,7 +67,6 @@ void
initMethodObject(void) initMethodObject(void)
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.6 $";
PURE_MIXIN_CLASS(Method, PURE_MIXIN_CLASS(Method,
"Base class for objects that want to be treated as methods\n" "Base class for objects that want to be treated as methods\n"
"\n" "\n"
...@@ -83,13 +82,11 @@ initMethodObject(void) ...@@ -83,13 +82,11 @@ initMethodObject(void)
/* Create the module and add the functions */ /* Create the module and add the functions */
m = Py_InitModule4("MethodObject", methods, m = Py_InitModule4("MethodObject", methods,
"Method-object mix-in class module\n\n" "Method-object mix-in class module\n\n"
"$Id: MethodObject.c,v 1.6 2001/03/28 14:06:51 jeremy Exp $\n", "$Id: MethodObject.c,v 1.7 2002/01/25 15:34:06 gvanrossum Exp $\n",
(PyObject*)NULL,PYTHON_API_VERSION); (PyObject*)NULL,PYTHON_API_VERSION);
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
PyExtensionClass_Export(d,"Method",MethodType); PyExtensionClass_Export(d,"Method",MethodType);
PyDict_SetItemString(d,"__version__",
PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
/* Check for errors */ /* Check for errors */
CHECK_FOR_ERRORS("can't initialize module MethodObject"); CHECK_FOR_ERRORS("can't initialize module MethodObject");
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE. DAMAGE.
$Id: Missing.c,v 1.11 2001/03/28 14:06:51 jeremy Exp $ $Id: Missing.c,v 1.12 2002/01/25 15:34:06 gvanrossum Exp $
If you have questions regarding this software, If you have questions regarding this software,
contact: contact:
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
static char Missing_module_documentation[] = static char Missing_module_documentation[] =
"" ""
"\n$Id: Missing.c,v 1.11 2001/03/28 14:06:51 jeremy Exp $" "\n$Id: Missing.c,v 1.12 2002/01/25 15:34:06 gvanrossum Exp $"
; ;
#include <string.h> #include <string.h>
...@@ -304,7 +304,6 @@ void ...@@ -304,7 +304,6 @@ void
initMissing(void) initMissing(void)
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.11 $";
if(! ((vname=PyString_FromString("V")) if(! ((vname=PyString_FromString("V"))
&& (Missing_dot_Value=PyString_FromString("Missing.Value")) && (Missing_dot_Value=PyString_FromString("Missing.Value"))
...@@ -319,9 +318,6 @@ initMissing(void) ...@@ -319,9 +318,6 @@ initMissing(void)
/* Add some symbolic constants to the module */ /* Add some symbolic constants to the module */
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
PyDict_SetItemString(d, "__version__",
PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
PyExtensionClass_Export(d,"Missing",MissingType); PyExtensionClass_Export(d,"Missing",MissingType);
theValue=PyObject_CallObject((PyObject*)&MissingType, NULL); theValue=PyObject_CallObject((PyObject*)&MissingType, NULL);
...@@ -340,6 +336,9 @@ initMissing(void) ...@@ -340,6 +336,9 @@ initMissing(void)
Revision Log: Revision Log:
$Log: Missing.c,v $ $Log: Missing.c,v $
Revision 1.12 2002/01/25 15:34:06 gvanrossum
Get rid of __version__, as Jim recommends. Use $ from docstring instead.
Revision 1.11 2001/03/28 14:06:51 jeremy Revision 1.11 2001/03/28 14:06:51 jeremy
gcc -Wall cleanup gcc -Wall cleanup
- make function decls prototypes - make function decls prototypes
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE. DAMAGE.
$Id: MultiMapping.c,v 1.9 2001/03/28 14:06:51 jeremy Exp $ $Id: MultiMapping.c,v 1.10 2002/01/25 15:34:06 gvanrossum Exp $
If you have questions regarding this software, If you have questions regarding this software,
contact: contact:
...@@ -234,18 +234,15 @@ void ...@@ -234,18 +234,15 @@ void
initMultiMapping(void) initMultiMapping(void)
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.9 $";
m = Py_InitModule4( m = Py_InitModule4(
"MultiMapping", MultiMapping_methods, "MultiMapping", MultiMapping_methods,
"MultiMapping -- Wrap multiple mapping objects for lookup" "MultiMapping -- Wrap multiple mapping objects for lookup"
"\n\n" "\n\n"
"$Id: MultiMapping.c,v 1.9 2001/03/28 14:06:51 jeremy Exp $\n", "$Id: MultiMapping.c,v 1.10 2002/01/25 15:34:06 gvanrossum Exp $\n",
(PyObject*)NULL,PYTHON_API_VERSION); (PyObject*)NULL,PYTHON_API_VERSION);
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
PyExtensionClass_Export(d,"MultiMapping",MMtype); PyExtensionClass_Export(d,"MultiMapping",MMtype);
PyDict_SetItemString(d,"__version__",
PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
if (PyErr_Occurred()) Py_FatalError("can't initialize module MultiMapping"); if (PyErr_Occurred()) Py_FatalError("can't initialize module MultiMapping");
} }
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
****************************************************************************/ ****************************************************************************/
static char Record_module_documentation[] = static char Record_module_documentation[] =
"" ""
"\n$Id: Record.c,v 1.13 2001/11/28 15:50:51 matt Exp $" "\n$Id: Record.c,v 1.14 2002/01/25 15:34:06 gvanrossum Exp $"
; ;
#ifdef PERSISTENCE #ifdef PERSISTENCE
...@@ -521,7 +521,6 @@ void ...@@ -521,7 +521,6 @@ void
initRecord(void) initRecord(void)
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.13 $";
UNLESS(py___record_schema__=PyString_FromString("__record_schema__")) return; UNLESS(py___record_schema__=PyString_FromString("__record_schema__")) return;
...@@ -548,10 +547,6 @@ initRecord(void) ...@@ -548,10 +547,6 @@ initRecord(void)
PyExtensionClass_Export(d,"Record",RecordType); PyExtensionClass_Export(d,"Record",RecordType);
PyDict_SetItemString(d, "__version__",
PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
/* Check for errors */ /* Check for errors */
if (PyErr_Occurred()) Py_FatalError("can't initialize module Record"); if (PyErr_Occurred()) Py_FatalError("can't initialize module Record");
} }
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE. DAMAGE.
$Id: Sync.c,v 1.3 2001/03/28 14:06:51 jeremy Exp $ $Id: Sync.c,v 1.4 2002/01/25 15:34:06 gvanrossum Exp $
If you have questions regarding this software, If you have questions regarding this software,
contact: contact:
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
static char Sync_module_documentation[] = static char Sync_module_documentation[] =
"" ""
"\n$Id: Sync.c,v 1.3 2001/03/28 14:06:51 jeremy Exp $" "\n$Id: Sync.c,v 1.4 2002/01/25 15:34:06 gvanrossum Exp $"
; ;
#include "ExtensionClass.h" #include "ExtensionClass.h"
...@@ -114,7 +114,6 @@ void ...@@ -114,7 +114,6 @@ void
initSync(void) initSync(void)
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.3 $";
PURE_MIXIN_CLASS( PURE_MIXIN_CLASS(
Synchronized, Synchronized,
"Mix-in class that provides synchonization of method calls\n" "Mix-in class that provides synchonization of method calls\n"
...@@ -138,8 +137,6 @@ initSync(void) ...@@ -138,8 +137,6 @@ initSync(void)
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
PyExtensionClass_Export(d,"Synchronized",SynchronizedType); PyExtensionClass_Export(d,"Synchronized",SynchronizedType);
PyDict_SetItemString(d,"__version__",
PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
CHECK_FOR_ERRORS("can't initialize module MethodObject"); CHECK_FOR_ERRORS("can't initialize module MethodObject");
} }
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE. DAMAGE.
$Id: ThreadLock.c,v 1.10 2001/11/08 17:02:09 bwarsaw Exp $ $Id: ThreadLock.c,v 1.11 2002/01/25 15:34:06 gvanrossum Exp $
If you have questions regarding this software, If you have questions regarding this software,
contact: contact:
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
*/ */
static char ThreadLock_module_documentation[] = static char ThreadLock_module_documentation[] =
"" ""
"\n$Id: ThreadLock.c,v 1.10 2001/11/08 17:02:09 bwarsaw Exp $" "\n$Id: ThreadLock.c,v 1.11 2002/01/25 15:34:06 gvanrossum Exp $"
; ;
#include "Python.h" #include "Python.h"
...@@ -305,8 +305,7 @@ static struct PyMethodDef Module_methods[] = { ...@@ -305,8 +305,7 @@ static struct PyMethodDef Module_methods[] = {
void void
initThreadLock(void) initThreadLock(void)
{ {
PyObject *m, *d, *s; PyObject *m, *d;
char *rev="$Revision: 1.10 $";
m = Py_InitModule4("ThreadLock", Module_methods, m = Py_InitModule4("ThreadLock", Module_methods,
ThreadLock_module_documentation, ThreadLock_module_documentation,
...@@ -320,10 +319,6 @@ initThreadLock(void) ...@@ -320,10 +319,6 @@ initThreadLock(void)
ErrorObject = PyString_FromString("ThreadLock.error"); ErrorObject = PyString_FromString("ThreadLock.error");
PyDict_SetItemString(d, "error", ErrorObject); PyDict_SetItemString(d, "error", ErrorObject);
s = PyString_FromStringAndSize(rev+11,strlen(rev+11)-2);
PyDict_SetItemString(d, "__version__", s);
Py_XDECREF(s);
#ifdef WITH_THREAD #ifdef WITH_THREAD
PyDict_SetItemString(d, "WITH_THREAD", PyInt_FromLong(1)); PyDict_SetItemString(d, "WITH_THREAD", PyInt_FromLong(1));
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment