Commit 4f769306 authored by Andreas Jung's avatar Andreas Jung

uninitialized error object got passed to PyErr_SetString.

Replaced it with a standard ValueError exception
parent 44b9e7fd
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
static char TimeStamp_module_documentation[] = static char TimeStamp_module_documentation[] =
"Defines 64-bit TimeStamp objects used as ZODB serial numbers.\n" "Defines 64-bit TimeStamp objects used as ZODB serial numbers.\n"
"\n" "\n"
"\n$Id: TimeStamp.c,v 1.8 2001/11/08 17:06:27 bwarsaw Exp $\n"; "\n$Id: TimeStamp.c,v 1.9 2001/11/26 20:33:24 andreasjung Exp $\n";
#include <stdlib.h> #include <stdlib.h>
#include <time.h> #include <time.h>
...@@ -96,7 +96,6 @@ static char TimeStamp_module_documentation[] = ...@@ -96,7 +96,6 @@ static char TimeStamp_module_documentation[] =
#include "Python.h" #include "Python.h"
#endif #endif
static PyObject *ErrorObject;
/* ----------------------------------------------------- */ /* ----------------------------------------------------- */
...@@ -184,7 +183,7 @@ TimeStamp___init__(TimeStamp *self, PyObject *args) ...@@ -184,7 +183,7 @@ TimeStamp___init__(TimeStamp *self, PyObject *args)
{ {
if (m != 8) if (m != 8)
{ {
PyErr_SetString(ErrorObject, "8-character string expected"); PyErr_SetString(PyExc_ValueError, "8-character string expected");
return NULL; return NULL;
} }
memcpy(self->data, s, 8); memcpy(self->data, s, 8);
...@@ -485,7 +484,7 @@ void ...@@ -485,7 +484,7 @@ void
initTimeStamp(void) initTimeStamp(void)
{ {
PyObject *m, *d, *s; PyObject *m, *d, *s;
char *rev="$Revision: 1.8 $"; char *rev="$Revision: 1.9 $";
if (TimeStamp_init_gmoff() < 0) return; if (TimeStamp_init_gmoff() < 0) return;
if (! ExtensionClassImported) return; if (! ExtensionClassImported) return;
......
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