Commit 2f9968f4 authored by Guido van Rossum's avatar Guido van Rossum

Get rid of __version__. Add $ to doc string where needed.

parent 6c7d0c42
......@@ -13,7 +13,7 @@
static char cPersistence_doc_string[] =
"Defines Persistent mixin class for persistent objects.\n"
"\n"
"$Id: cPersistence.c,v 1.47 2001/11/28 15:51:20 matt Exp $\n";
"$Id: cPersistence.c,v 1.48 2002/01/25 14:51:55 gvanrossum Exp $\n";
#include <string.h>
#include "cPersistence.h"
......@@ -688,7 +688,6 @@ void
initcPersistence(void)
{
PyObject *m, *d, *s;
char *rev="$Revision: 1.47 $";
s = PyString_FromString("TimeStamp");
if (s == NULL)
......@@ -709,9 +708,6 @@ initcPersistence(void)
d = PyModule_GetDict(m);
s = PyString_FromStringAndSize(rev+11,strlen(rev+11)-2);
PyDict_SetItemString(d,"__version__", s);
Py_XDECREF(s);
PyExtensionClass_Export(d, "Persistent", Pertype);
PyExtensionClass_Export(d, "Overridable", Overridable);
......
......@@ -13,7 +13,7 @@
static char cPickleCache_doc_string[] =
"Defines the PickleCache used by ZODB Connection objects.\n"
"\n"
"$Id: cPickleCache.c,v 1.37 2001/11/28 15:51:20 matt Exp $\n";
"$Id: cPickleCache.c,v 1.38 2002/01/25 14:51:55 gvanrossum Exp $\n";
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E))
......@@ -654,8 +654,7 @@ static struct PyMethodDef cCM_methods[] = {
void
initcPickleCache(void)
{
PyObject *m, *d, *s;
char *rev="$Revision: 1.37 $";
PyObject *m, *d;
Cctype.ob_type=&PyType_Type;
......@@ -670,10 +669,6 @@ initcPickleCache(void)
py__p_jar=PyString_FromString("_p_jar");
py__p_changed=PyString_FromString("_p_changed");
s = PyString_FromStringAndSize(rev+11,strlen(rev+11)-2);
PyDict_SetItemString(d,"__version__", s);
Py_XDECREF(s);
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module cPickleCache");
......
......@@ -14,7 +14,7 @@
static char TimeStamp_module_documentation[] =
"Defines 64-bit TimeStamp objects used as ZODB serial numbers.\n"
"\n"
"\n$Id: TimeStamp.c,v 1.12 2002/01/24 20:19:06 gvanrossum Exp $\n";
"\n$Id: TimeStamp.c,v 1.13 2002/01/25 14:51:55 gvanrossum Exp $\n";
#include <stdlib.h>
#include <time.h>
......@@ -412,7 +412,6 @@ void
initTimeStamp(void)
{
PyObject *m, *d, *s;
char *rev="$Revision: 1.12 $";
if (TimeStamp_init_gmoff() < 0) return;
if (! ExtensionClassImported) return;
......@@ -437,10 +436,6 @@ initTimeStamp(void)
PyDict_SetItemString(d, "error", s);
Py_XDECREF(s);
s = PyString_FromStringAndSize(rev + 11, strlen(rev + 11) - 2);
PyDict_SetItemString(d, "__version__", s);
Py_XDECREF(s);
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module TimeStamp");
......
......@@ -13,7 +13,7 @@
static char cPersistence_doc_string[] =
"Defines Persistent mixin class for persistent objects.\n"
"\n"
"$Id: cPersistence.c,v 1.47 2001/11/28 15:51:20 matt Exp $\n";
"$Id: cPersistence.c,v 1.48 2002/01/25 14:51:55 gvanrossum Exp $\n";
#include <string.h>
#include "cPersistence.h"
......@@ -688,7 +688,6 @@ void
initcPersistence(void)
{
PyObject *m, *d, *s;
char *rev="$Revision: 1.47 $";
s = PyString_FromString("TimeStamp");
if (s == NULL)
......@@ -709,9 +708,6 @@ initcPersistence(void)
d = PyModule_GetDict(m);
s = PyString_FromStringAndSize(rev+11,strlen(rev+11)-2);
PyDict_SetItemString(d,"__version__", s);
Py_XDECREF(s);
PyExtensionClass_Export(d, "Persistent", Pertype);
PyExtensionClass_Export(d, "Overridable", Overridable);
......
......@@ -13,7 +13,7 @@
static char cPickleCache_doc_string[] =
"Defines the PickleCache used by ZODB Connection objects.\n"
"\n"
"$Id: cPickleCache.c,v 1.37 2001/11/28 15:51:20 matt Exp $\n";
"$Id: cPickleCache.c,v 1.38 2002/01/25 14:51:55 gvanrossum Exp $\n";
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E))
......@@ -654,8 +654,7 @@ static struct PyMethodDef cCM_methods[] = {
void
initcPickleCache(void)
{
PyObject *m, *d, *s;
char *rev="$Revision: 1.37 $";
PyObject *m, *d;
Cctype.ob_type=&PyType_Type;
......@@ -670,10 +669,6 @@ initcPickleCache(void)
py__p_jar=PyString_FromString("_p_jar");
py__p_changed=PyString_FromString("_p_changed");
s = PyString_FromStringAndSize(rev+11,strlen(rev+11)-2);
PyDict_SetItemString(d,"__version__", s);
Py_XDECREF(s);
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module cPickleCache");
......
......@@ -10,6 +10,11 @@
FOR A PARTICULAR PURPOSE
****************************************************************************/
static char coptimizations_doc_string[] =
"C optimization for new_persistent_id().\n"
"\n"
"$Id: coptimizations.c,v 1.15 2002/01/25 14:51:55 gvanrossum Exp $\n";
#include "Python.h"
#define DONT_USE_CPERSISTENCECAPI
#include "cPersistence.h"
......@@ -246,8 +251,7 @@ static struct PyMethodDef Module_Level__methods[] = {
void
initcoptimizations(void)
{
PyObject *m, *d, *s;
char *rev="$Revision: 1.14 $";
PyObject *m, *d;
#define make_string(S) if (! (py_ ## S=PyString_FromString(#S))) return
make_string(_p_oid);
......@@ -269,17 +273,13 @@ initcoptimizations(void)
UNLESS (ExtensionClassImported) return;
m = Py_InitModule4("coptimizations", Module_Level__methods,
"C optimizations",
coptimizations_doc_string,
(PyObject*)NULL,PYTHON_API_VERSION);
d = PyModule_GetDict(m);
persistent_idType.ob_type=&PyType_Type;
PyDict_SetItemString(d,"persistent_idType", OBJECT(&persistent_idType));
s = PyString_FromStringAndSize(rev+11,strlen(rev+11)-2);
PyDict_SetItemString(d, "__version__", s);
Py_XDECREF(s);
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module coptimizations");
......
......@@ -13,7 +13,7 @@
static char winlock_doc_string[] =
"Lock files on Windows."
"\n"
"$Id: winlock.c,v 1.6 2001/11/28 15:51:20 matt Exp $\n";
"$Id: winlock.c,v 1.7 2002/01/25 14:51:56 gvanrossum Exp $\n";
#include "Python.h"
......@@ -67,7 +67,6 @@ static struct PyMethodDef methods[] = {
DL_EXPORT(void)
initwinlock(void) {
PyObject *m, *d;
char *rev="$Revision: 1.6 $";
if (!(Error=PyString_FromString("winlock.error")))
return;
......@@ -78,9 +77,4 @@ initwinlock(void) {
d = PyModule_GetDict(m);
PyDict_SetItemString(d, "error", Error);
/* XXX below could blow up in PyDict_SetItem() */
PyDict_SetItemString(d,"__version__",
PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
}
......@@ -13,7 +13,7 @@
static char cPersistence_doc_string[] =
"Defines Persistent mixin class for persistent objects.\n"
"\n"
"$Id: cPersistence.c,v 1.47 2001/11/28 15:51:20 matt Exp $\n";
"$Id: cPersistence.c,v 1.48 2002/01/25 14:51:55 gvanrossum Exp $\n";
#include <string.h>
#include "cPersistence.h"
......@@ -688,7 +688,6 @@ void
initcPersistence(void)
{
PyObject *m, *d, *s;
char *rev="$Revision: 1.47 $";
s = PyString_FromString("TimeStamp");
if (s == NULL)
......@@ -709,9 +708,6 @@ initcPersistence(void)
d = PyModule_GetDict(m);
s = PyString_FromStringAndSize(rev+11,strlen(rev+11)-2);
PyDict_SetItemString(d,"__version__", s);
Py_XDECREF(s);
PyExtensionClass_Export(d, "Persistent", Pertype);
PyExtensionClass_Export(d, "Overridable", Overridable);
......
......@@ -13,7 +13,7 @@
static char cPickleCache_doc_string[] =
"Defines the PickleCache used by ZODB Connection objects.\n"
"\n"
"$Id: cPickleCache.c,v 1.37 2001/11/28 15:51:20 matt Exp $\n";
"$Id: cPickleCache.c,v 1.38 2002/01/25 14:51:55 gvanrossum Exp $\n";
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E))
......@@ -654,8 +654,7 @@ static struct PyMethodDef cCM_methods[] = {
void
initcPickleCache(void)
{
PyObject *m, *d, *s;
char *rev="$Revision: 1.37 $";
PyObject *m, *d;
Cctype.ob_type=&PyType_Type;
......@@ -670,10 +669,6 @@ initcPickleCache(void)
py__p_jar=PyString_FromString("_p_jar");
py__p_changed=PyString_FromString("_p_changed");
s = PyString_FromStringAndSize(rev+11,strlen(rev+11)-2);
PyDict_SetItemString(d,"__version__", s);
Py_XDECREF(s);
/* Check for errors */
if (PyErr_Occurred())
Py_FatalError("can't initialize module cPickleCache");
......
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