Commit 97943b7b authored by Jim Fulton's avatar Jim Fulton

*** empty log message ***

parent fb2a4763
/* /*
$Id: cPersistence.c,v 1.16 1997/06/30 15:26:35 jim Exp $ $Id: cPersistence.c,v 1.17 1997/07/16 20:18:32 jim Exp $
C Persistence Module C Persistence Module
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
*****************************************************************************/ *****************************************************************************/
static char *what_string = "$Id: cPersistence.c,v 1.16 1997/06/30 15:26:35 jim Exp $"; static char *what_string = "$Id: cPersistence.c,v 1.17 1997/07/16 20:18:32 jim Exp $";
#include <time.h> #include <time.h>
#include "cPersistence.h" #include "cPersistence.h"
...@@ -406,7 +406,6 @@ Per__p___init__(self, args) ...@@ -406,7 +406,6 @@ Per__p___init__(self, args)
static PyObject * static PyObject *
Per__p___reinit__(cPersistentObject *self, PyObject *args) Per__p___reinit__(cPersistentObject *self, PyObject *args)
{ {
int oid;
PyObject *init=0, *copy, *dict; PyObject *init=0, *copy, *dict;
#ifdef DEBUG_LOG #ifdef DEBUG_LOG
...@@ -936,7 +935,7 @@ void ...@@ -936,7 +935,7 @@ void
initcPersistence() initcPersistence()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.16 $"; char *rev="$Revision: 1.17 $";
PATimeType.ob_type=&PyType_Type; PATimeType.ob_type=&PyType_Type;
...@@ -963,6 +962,9 @@ initcPersistence() ...@@ -963,6 +962,9 @@ initcPersistence()
/**************************************************************************** /****************************************************************************
$Log: cPersistence.c,v $ $Log: cPersistence.c,v $
Revision 1.17 1997/07/16 20:18:32 jim
*** empty log message ***
Revision 1.16 1997/06/30 15:26:35 jim Revision 1.16 1997/06/30 15:26:35 jim
Changed so getting an object's __class__ does not cause it's Changed so getting an object's __class__ does not cause it's
activation. activation.
......
/* /*
$Id: cPickleCache.c,v 1.8 1997/06/30 15:27:51 jim Exp $ $Id: cPickleCache.c,v 1.9 1997/07/16 20:18:40 jim Exp $
C implementation of a pickle jar cache. C implementation of a pickle jar cache.
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
(540) 371-6909 (540) 371-6909
***************************************************************************/ ***************************************************************************/
static char *what_string = "$Id: cPickleCache.c,v 1.8 1997/06/30 15:27:51 jim Exp $"; static char *what_string = "$Id: cPickleCache.c,v 1.9 1997/07/16 20:18:40 jim Exp $";
#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))
...@@ -306,7 +306,7 @@ maybegc(ccobject *self, PyObject *thisv) ...@@ -306,7 +306,7 @@ maybegc(ccobject *self, PyObject *thisv)
self->cache_size=0; self->cache_size=0;
n=s/size; n=s/size;
if(n < 3) n=3; if(n < 3) n=3;
dt=self->cache_age*(0.2+0.8*size/s); dt=(long)(self->cache_age*(0.2+0.8*size/s));
if(dt < 10) dt=10; if(dt < 10) dt=10;
now=time(NULL); now=time(NULL);
...@@ -620,7 +620,7 @@ void ...@@ -620,7 +620,7 @@ void
initcPickleCache() initcPickleCache()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.8 $"; char *rev="$Revision: 1.9 $";
Cctype.ob_type=&PyType_Type; Cctype.ob_type=&PyType_Type;
...@@ -648,6 +648,9 @@ initcPickleCache() ...@@ -648,6 +648,9 @@ initcPickleCache()
/****************************************************************************** /******************************************************************************
$Log: cPickleCache.c,v $ $Log: cPickleCache.c,v $
Revision 1.9 1997/07/16 20:18:40 jim
*** empty log message ***
Revision 1.8 1997/06/30 15:27:51 jim Revision 1.8 1997/06/30 15:27:51 jim
Added machinery to track cache statistics. Added machinery to track cache statistics.
Fixed bug in garbage collector, which had a nasty habit Fixed bug in garbage collector, which had a nasty habit
......
/* /*
$Id: cPersistence.c,v 1.16 1997/06/30 15:26:35 jim Exp $ $Id: cPersistence.c,v 1.17 1997/07/16 20:18:32 jim Exp $
C Persistence Module C Persistence Module
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
*****************************************************************************/ *****************************************************************************/
static char *what_string = "$Id: cPersistence.c,v 1.16 1997/06/30 15:26:35 jim Exp $"; static char *what_string = "$Id: cPersistence.c,v 1.17 1997/07/16 20:18:32 jim Exp $";
#include <time.h> #include <time.h>
#include "cPersistence.h" #include "cPersistence.h"
...@@ -406,7 +406,6 @@ Per__p___init__(self, args) ...@@ -406,7 +406,6 @@ Per__p___init__(self, args)
static PyObject * static PyObject *
Per__p___reinit__(cPersistentObject *self, PyObject *args) Per__p___reinit__(cPersistentObject *self, PyObject *args)
{ {
int oid;
PyObject *init=0, *copy, *dict; PyObject *init=0, *copy, *dict;
#ifdef DEBUG_LOG #ifdef DEBUG_LOG
...@@ -936,7 +935,7 @@ void ...@@ -936,7 +935,7 @@ void
initcPersistence() initcPersistence()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.16 $"; char *rev="$Revision: 1.17 $";
PATimeType.ob_type=&PyType_Type; PATimeType.ob_type=&PyType_Type;
...@@ -963,6 +962,9 @@ initcPersistence() ...@@ -963,6 +962,9 @@ initcPersistence()
/**************************************************************************** /****************************************************************************
$Log: cPersistence.c,v $ $Log: cPersistence.c,v $
Revision 1.17 1997/07/16 20:18:32 jim
*** empty log message ***
Revision 1.16 1997/06/30 15:26:35 jim Revision 1.16 1997/06/30 15:26:35 jim
Changed so getting an object's __class__ does not cause it's Changed so getting an object's __class__ does not cause it's
activation. activation.
......
/* /*
$Id: cPickleCache.c,v 1.8 1997/06/30 15:27:51 jim Exp $ $Id: cPickleCache.c,v 1.9 1997/07/16 20:18:40 jim Exp $
C implementation of a pickle jar cache. C implementation of a pickle jar cache.
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
(540) 371-6909 (540) 371-6909
***************************************************************************/ ***************************************************************************/
static char *what_string = "$Id: cPickleCache.c,v 1.8 1997/06/30 15:27:51 jim Exp $"; static char *what_string = "$Id: cPickleCache.c,v 1.9 1997/07/16 20:18:40 jim Exp $";
#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))
...@@ -306,7 +306,7 @@ maybegc(ccobject *self, PyObject *thisv) ...@@ -306,7 +306,7 @@ maybegc(ccobject *self, PyObject *thisv)
self->cache_size=0; self->cache_size=0;
n=s/size; n=s/size;
if(n < 3) n=3; if(n < 3) n=3;
dt=self->cache_age*(0.2+0.8*size/s); dt=(long)(self->cache_age*(0.2+0.8*size/s));
if(dt < 10) dt=10; if(dt < 10) dt=10;
now=time(NULL); now=time(NULL);
...@@ -620,7 +620,7 @@ void ...@@ -620,7 +620,7 @@ void
initcPickleCache() initcPickleCache()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.8 $"; char *rev="$Revision: 1.9 $";
Cctype.ob_type=&PyType_Type; Cctype.ob_type=&PyType_Type;
...@@ -648,6 +648,9 @@ initcPickleCache() ...@@ -648,6 +648,9 @@ initcPickleCache()
/****************************************************************************** /******************************************************************************
$Log: cPickleCache.c,v $ $Log: cPickleCache.c,v $
Revision 1.9 1997/07/16 20:18:40 jim
*** empty log message ***
Revision 1.8 1997/06/30 15:27:51 jim Revision 1.8 1997/06/30 15:27:51 jim
Added machinery to track cache statistics. Added machinery to track cache statistics.
Fixed bug in garbage collector, which had a nasty habit Fixed bug in garbage collector, which had a nasty habit
......
/* /*
$Id: cPersistence.c,v 1.16 1997/06/30 15:26:35 jim Exp $ $Id: cPersistence.c,v 1.17 1997/07/16 20:18:32 jim Exp $
C Persistence Module C Persistence Module
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
*****************************************************************************/ *****************************************************************************/
static char *what_string = "$Id: cPersistence.c,v 1.16 1997/06/30 15:26:35 jim Exp $"; static char *what_string = "$Id: cPersistence.c,v 1.17 1997/07/16 20:18:32 jim Exp $";
#include <time.h> #include <time.h>
#include "cPersistence.h" #include "cPersistence.h"
...@@ -406,7 +406,6 @@ Per__p___init__(self, args) ...@@ -406,7 +406,6 @@ Per__p___init__(self, args)
static PyObject * static PyObject *
Per__p___reinit__(cPersistentObject *self, PyObject *args) Per__p___reinit__(cPersistentObject *self, PyObject *args)
{ {
int oid;
PyObject *init=0, *copy, *dict; PyObject *init=0, *copy, *dict;
#ifdef DEBUG_LOG #ifdef DEBUG_LOG
...@@ -936,7 +935,7 @@ void ...@@ -936,7 +935,7 @@ void
initcPersistence() initcPersistence()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.16 $"; char *rev="$Revision: 1.17 $";
PATimeType.ob_type=&PyType_Type; PATimeType.ob_type=&PyType_Type;
...@@ -963,6 +962,9 @@ initcPersistence() ...@@ -963,6 +962,9 @@ initcPersistence()
/**************************************************************************** /****************************************************************************
$Log: cPersistence.c,v $ $Log: cPersistence.c,v $
Revision 1.17 1997/07/16 20:18:32 jim
*** empty log message ***
Revision 1.16 1997/06/30 15:26:35 jim Revision 1.16 1997/06/30 15:26:35 jim
Changed so getting an object's __class__ does not cause it's Changed so getting an object's __class__ does not cause it's
activation. activation.
......
/* /*
$Id: cPickleCache.c,v 1.8 1997/06/30 15:27:51 jim Exp $ $Id: cPickleCache.c,v 1.9 1997/07/16 20:18:40 jim Exp $
C implementation of a pickle jar cache. C implementation of a pickle jar cache.
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
(540) 371-6909 (540) 371-6909
***************************************************************************/ ***************************************************************************/
static char *what_string = "$Id: cPickleCache.c,v 1.8 1997/06/30 15:27:51 jim Exp $"; static char *what_string = "$Id: cPickleCache.c,v 1.9 1997/07/16 20:18:40 jim Exp $";
#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))
...@@ -306,7 +306,7 @@ maybegc(ccobject *self, PyObject *thisv) ...@@ -306,7 +306,7 @@ maybegc(ccobject *self, PyObject *thisv)
self->cache_size=0; self->cache_size=0;
n=s/size; n=s/size;
if(n < 3) n=3; if(n < 3) n=3;
dt=self->cache_age*(0.2+0.8*size/s); dt=(long)(self->cache_age*(0.2+0.8*size/s));
if(dt < 10) dt=10; if(dt < 10) dt=10;
now=time(NULL); now=time(NULL);
...@@ -620,7 +620,7 @@ void ...@@ -620,7 +620,7 @@ void
initcPickleCache() initcPickleCache()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.8 $"; char *rev="$Revision: 1.9 $";
Cctype.ob_type=&PyType_Type; Cctype.ob_type=&PyType_Type;
...@@ -648,6 +648,9 @@ initcPickleCache() ...@@ -648,6 +648,9 @@ initcPickleCache()
/****************************************************************************** /******************************************************************************
$Log: cPickleCache.c,v $ $Log: cPickleCache.c,v $
Revision 1.9 1997/07/16 20:18:40 jim
*** empty log message ***
Revision 1.8 1997/06/30 15:27:51 jim Revision 1.8 1997/06/30 15:27:51 jim
Added machinery to track cache statistics. Added machinery to track cache statistics.
Fixed bug in garbage collector, which had a nasty habit Fixed bug in garbage collector, which had a nasty habit
......
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