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 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
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,
contact:
......@@ -1527,7 +1527,7 @@ initAcquisition(void)
{
PyObject *m, *d;
PyObject *api;
char *rev="$Revision: 1.54 $";
PURE_MIXIN_CLASS(Acquirer,
"Base class for objects that implicitly"
" acquire attributes from containers\n"
......@@ -1546,7 +1546,7 @@ initAcquisition(void)
/* Create the module and add the functions */
m = Py_InitModule4("Acquisition", methods,
"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);
d = PyModule_GetDict(m);
......@@ -1559,10 +1559,6 @@ initAcquisition(void)
/* Create aliases */
PyDict_SetItemString(d,"Implicit",OBJECT(&AcquirerType));
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_Get = capi_aq_get;
......
......@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
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,
contact:
......@@ -136,7 +136,6 @@ void
initComputedAttribute(void)
{
PyObject *m, *d;
char *rev="$Revision: 1.5 $";
UNLESS(ExtensionClassImported) return;
......@@ -146,12 +145,10 @@ initComputedAttribute(void)
/* Create the module and add the functions */
m = Py_InitModule4("ComputedAttribute", methods,
"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);
d = PyModule_GetDict(m);
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");
}
......@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
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,
contact:
......@@ -54,7 +54,7 @@ static char ExtensionClass_module_documentation[] =
" - They provide access to unbound methods,\n"
" - They can be called to create instances.\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>
......@@ -3519,7 +3519,6 @@ void
initExtensionClass(void)
{
PyObject *m, *d, *s;
char *rev="$Revision: 1.49 $";
PURE_MIXIN_CLASS(Base, "Minimalbase class for Extension Classes", NULL);
PMethodType.ob_type=&PyType_Type;
......@@ -3534,9 +3533,6 @@ initExtensionClass(void)
(PyObject*)NULL,PYTHON_API_VERSION);
d = PyModule_GetDict(m);
s = PyString_FromStringAndSize(rev+11,strlen(rev+11)-2);
PyDict_SetItemString(d,"__version__", s);
Py_XDECREF(s);
init_py_names();
......
......@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
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,
contact:
......@@ -67,7 +67,6 @@ void
initMethodObject(void)
{
PyObject *m, *d;
char *rev="$Revision: 1.6 $";
PURE_MIXIN_CLASS(Method,
"Base class for objects that want to be treated as methods\n"
"\n"
......@@ -83,13 +82,11 @@ initMethodObject(void)
/* Create the module and add the functions */
m = Py_InitModule4("MethodObject", methods,
"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);
d = PyModule_GetDict(m);
PyExtensionClass_Export(d,"Method",MethodType);
PyDict_SetItemString(d,"__version__",
PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
/* Check for errors */
CHECK_FOR_ERRORS("can't initialize module MethodObject");
......
......@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
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,
contact:
......@@ -47,7 +47,7 @@
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>
......@@ -304,7 +304,6 @@ void
initMissing(void)
{
PyObject *m, *d;
char *rev="$Revision: 1.11 $";
if(! ((vname=PyString_FromString("V"))
&& (Missing_dot_Value=PyString_FromString("Missing.Value"))
......@@ -319,9 +318,6 @@ initMissing(void)
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
PyDict_SetItemString(d, "__version__",
PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
PyExtensionClass_Export(d,"Missing",MissingType);
theValue=PyObject_CallObject((PyObject*)&MissingType, NULL);
......@@ -340,6 +336,9 @@ initMissing(void)
Revision Log:
$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
gcc -Wall cleanup
- make function decls prototypes
......
......@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
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,
contact:
......@@ -234,18 +234,15 @@ void
initMultiMapping(void)
{
PyObject *m, *d;
char *rev="$Revision: 1.9 $";
m = Py_InitModule4(
"MultiMapping", MultiMapping_methods,
"MultiMapping -- Wrap multiple mapping objects for lookup"
"\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);
d = PyModule_GetDict(m);
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");
}
......@@ -12,7 +12,7 @@
****************************************************************************/
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
......@@ -521,7 +521,6 @@ void
initRecord(void)
{
PyObject *m, *d;
char *rev="$Revision: 1.13 $";
UNLESS(py___record_schema__=PyString_FromString("__record_schema__")) return;
......@@ -548,10 +547,6 @@ initRecord(void)
PyExtensionClass_Export(d,"Record",RecordType);
PyDict_SetItemString(d, "__version__",
PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
/* Check for errors */
if (PyErr_Occurred()) Py_FatalError("can't initialize module Record");
}
......@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
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,
contact:
......@@ -47,7 +47,7 @@
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"
......@@ -114,7 +114,6 @@ void
initSync(void)
{
PyObject *m, *d;
char *rev="$Revision: 1.3 $";
PURE_MIXIN_CLASS(
Synchronized,
"Mix-in class that provides synchonization of method calls\n"
......@@ -138,8 +137,6 @@ initSync(void)
d = PyModule_GetDict(m);
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");
}
......@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
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,
contact:
......@@ -46,7 +46,7 @@
*/
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"
......@@ -305,8 +305,7 @@ static struct PyMethodDef Module_methods[] = {
void
initThreadLock(void)
{
PyObject *m, *d, *s;
char *rev="$Revision: 1.10 $";
PyObject *m, *d;
m = Py_InitModule4("ThreadLock", Module_methods,
ThreadLock_module_documentation,
......@@ -320,10 +319,6 @@ initThreadLock(void)
ErrorObject = PyString_FromString("ThreadLock.error");
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
PyDict_SetItemString(d, "WITH_THREAD", PyInt_FromLong(1));
#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