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

These C extensions living in a package were doing relative imports of

other modules living in the same package.  It turns out that that
doesn't work when the __import__ builtin has been replaced by one
written in Python.  The easiest fix is to use absolute imports.
parent e4869def
......@@ -14,7 +14,7 @@
static char cPersistence_doc_string[] =
"Defines Persistent mixin class for persistent objects.\n"
"\n"
"$Id: cPersistence.c,v 1.62 2002/06/18 21:37:56 jeremy Exp $\n";
"$Id: cPersistence.c,v 1.63 2002/09/30 16:02:32 gvanrossum Exp $\n";
#include "cPersistence.h"
......@@ -845,7 +845,7 @@ initcPersistence(void)
{
PyObject *m, *d, *s;
s = PyString_FromString("TimeStamp");
s = PyString_FromString("ZODB.TimeStamp");
if (s == NULL)
return;
m = PyImport_Import(s);
......
......@@ -14,7 +14,7 @@
static char cPersistence_doc_string[] =
"Defines Persistent mixin class for persistent objects.\n"
"\n"
"$Id: cPersistence.c,v 1.62 2002/06/18 21:37:56 jeremy Exp $\n";
"$Id: cPersistence.c,v 1.63 2002/09/30 16:02:32 gvanrossum Exp $\n";
#include "cPersistence.h"
......@@ -845,7 +845,7 @@ initcPersistence(void)
{
PyObject *m, *d, *s;
s = PyString_FromString("TimeStamp");
s = PyString_FromString("ZODB.TimeStamp");
if (s == NULL)
return;
m = PyImport_Import(s);
......
......@@ -14,7 +14,7 @@
static char coptimizations_doc_string[] =
"C optimization for new_persistent_id().\n"
"\n"
"$Id: coptimizations.c,v 1.19 2002/09/17 03:42:58 jeremy Exp $\n";
"$Id: coptimizations.c,v 1.20 2002/09/30 16:02:32 gvanrossum Exp $\n";
#include "Python.h"
#define DONT_USE_CPERSISTENCECAPI
......@@ -288,7 +288,7 @@ initcoptimizations(void)
make_string(new_oid);
/* Get InvalidObjectReference error */
UNLESS (m=PyString_FromString("POSException")) return;
UNLESS (m=PyString_FromString("ZODB.POSException")) return;
ASSIGN(m, PyImport_Import(m));
UNLESS (m) return;
ASSIGN(m, PyObject_GetAttrString(m, "InvalidObjectReference"));
......
......@@ -14,7 +14,7 @@
static char cPersistence_doc_string[] =
"Defines Persistent mixin class for persistent objects.\n"
"\n"
"$Id: cPersistence.c,v 1.62 2002/06/18 21:37:56 jeremy Exp $\n";
"$Id: cPersistence.c,v 1.63 2002/09/30 16:02:32 gvanrossum Exp $\n";
#include "cPersistence.h"
......@@ -845,7 +845,7 @@ initcPersistence(void)
{
PyObject *m, *d, *s;
s = PyString_FromString("TimeStamp");
s = PyString_FromString("ZODB.TimeStamp");
if (s == NULL)
return;
m = PyImport_Import(s);
......
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