Commit 295455b1 authored by Jim Fulton's avatar Jim Fulton

Added a macro to prevent declaration of cPersistenceCAPI in

cPersistence.c to avoid compiler warnings in cPickleCache and
coptimizations.
parent fe9bccf8
...@@ -112,7 +112,9 @@ typedef struct { ...@@ -112,7 +112,9 @@ typedef struct {
persetattr persetattro; persetattr persetattro;
} cPersistenceCAPIstruct; } cPersistenceCAPIstruct;
#ifndef DONT_USE_CPERSISTENCECAPI
static cPersistenceCAPIstruct *cPersistenceCAPI; static cPersistenceCAPIstruct *cPersistenceCAPI;
#endif
#define cPersistanceModuleName "cPersistence" #define cPersistanceModuleName "cPersistence"
......
...@@ -85,13 +85,14 @@ ...@@ -85,13 +85,14 @@
static char cPickleCache_doc_string[] = static char cPickleCache_doc_string[] =
"Defines the PickleCache used by ZODB Connection objects.\n" "Defines the PickleCache used by ZODB Connection objects.\n"
"\n" "\n"
"$Id: cPickleCache.c,v 1.32 2001/03/28 00:35:09 jeremy Exp $\n"; "$Id: cPickleCache.c,v 1.33 2001/03/28 14:36:30 jim Exp $\n";
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;} #define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E)) #define UNLESS(E) if(!(E))
#define UNLESS_ASSIGN(V,E) ASSIGN(V,E) UNLESS(V) #define UNLESS_ASSIGN(V,E) ASSIGN(V,E) UNLESS(V)
#define OBJECT(O) ((PyObject*)O) #define OBJECT(O) ((PyObject*)O)
#define DONT_USE_CPERSISTENCECAPI
#include "cPersistence.h" #include "cPersistence.h"
#include <time.h> #include <time.h>
...@@ -678,7 +679,7 @@ void ...@@ -678,7 +679,7 @@ void
initcPickleCache(void) initcPickleCache(void)
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.32 $"; char *rev="$Revision: 1.33 $";
Cctype.ob_type=&PyType_Type; Cctype.ob_type=&PyType_Type;
......
...@@ -112,7 +112,9 @@ typedef struct { ...@@ -112,7 +112,9 @@ typedef struct {
persetattr persetattro; persetattr persetattro;
} cPersistenceCAPIstruct; } cPersistenceCAPIstruct;
#ifndef DONT_USE_CPERSISTENCECAPI
static cPersistenceCAPIstruct *cPersistenceCAPI; static cPersistenceCAPIstruct *cPersistenceCAPI;
#endif
#define cPersistanceModuleName "cPersistence" #define cPersistanceModuleName "cPersistence"
......
...@@ -85,13 +85,14 @@ ...@@ -85,13 +85,14 @@
static char cPickleCache_doc_string[] = static char cPickleCache_doc_string[] =
"Defines the PickleCache used by ZODB Connection objects.\n" "Defines the PickleCache used by ZODB Connection objects.\n"
"\n" "\n"
"$Id: cPickleCache.c,v 1.32 2001/03/28 00:35:09 jeremy Exp $\n"; "$Id: cPickleCache.c,v 1.33 2001/03/28 14:36:30 jim Exp $\n";
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;} #define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E)) #define UNLESS(E) if(!(E))
#define UNLESS_ASSIGN(V,E) ASSIGN(V,E) UNLESS(V) #define UNLESS_ASSIGN(V,E) ASSIGN(V,E) UNLESS(V)
#define OBJECT(O) ((PyObject*)O) #define OBJECT(O) ((PyObject*)O)
#define DONT_USE_CPERSISTENCECAPI
#include "cPersistence.h" #include "cPersistence.h"
#include <time.h> #include <time.h>
...@@ -678,7 +679,7 @@ void ...@@ -678,7 +679,7 @@ void
initcPickleCache(void) initcPickleCache(void)
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.32 $"; char *rev="$Revision: 1.33 $";
Cctype.ob_type=&PyType_Type; Cctype.ob_type=&PyType_Type;
......
...@@ -83,6 +83,7 @@ ...@@ -83,6 +83,7 @@
****************************************************************************/ ****************************************************************************/
#include "Python.h" #include "Python.h"
#define DONT_USE_CPERSISTENCECAPI
#include "cPersistence.h" #include "cPersistence.h"
static void PyVar_Assign(PyObject **v, PyObject *e) { Py_XDECREF(*v); *v=e;} static void PyVar_Assign(PyObject **v, PyObject *e) { Py_XDECREF(*v); *v=e;}
...@@ -317,7 +318,7 @@ void ...@@ -317,7 +318,7 @@ void
initcoptimizations(void) initcoptimizations(void)
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.10 $"; char *rev="$Revision: 1.11 $";
#define make_string(S) if (! (py_ ## S=PyString_FromString(#S))) return #define make_string(S) if (! (py_ ## S=PyString_FromString(#S))) return
make_string(_p_oid); make_string(_p_oid);
......
...@@ -112,7 +112,9 @@ typedef struct { ...@@ -112,7 +112,9 @@ typedef struct {
persetattr persetattro; persetattr persetattro;
} cPersistenceCAPIstruct; } cPersistenceCAPIstruct;
#ifndef DONT_USE_CPERSISTENCECAPI
static cPersistenceCAPIstruct *cPersistenceCAPI; static cPersistenceCAPIstruct *cPersistenceCAPI;
#endif
#define cPersistanceModuleName "cPersistence" #define cPersistanceModuleName "cPersistence"
......
...@@ -85,13 +85,14 @@ ...@@ -85,13 +85,14 @@
static char cPickleCache_doc_string[] = static char cPickleCache_doc_string[] =
"Defines the PickleCache used by ZODB Connection objects.\n" "Defines the PickleCache used by ZODB Connection objects.\n"
"\n" "\n"
"$Id: cPickleCache.c,v 1.32 2001/03/28 00:35:09 jeremy Exp $\n"; "$Id: cPickleCache.c,v 1.33 2001/03/28 14:36:30 jim Exp $\n";
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;} #define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E)) #define UNLESS(E) if(!(E))
#define UNLESS_ASSIGN(V,E) ASSIGN(V,E) UNLESS(V) #define UNLESS_ASSIGN(V,E) ASSIGN(V,E) UNLESS(V)
#define OBJECT(O) ((PyObject*)O) #define OBJECT(O) ((PyObject*)O)
#define DONT_USE_CPERSISTENCECAPI
#include "cPersistence.h" #include "cPersistence.h"
#include <time.h> #include <time.h>
...@@ -678,7 +679,7 @@ void ...@@ -678,7 +679,7 @@ void
initcPickleCache(void) initcPickleCache(void)
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.32 $"; char *rev="$Revision: 1.33 $";
Cctype.ob_type=&PyType_Type; Cctype.ob_type=&PyType_Type;
......
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