Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
d3c16d7d
Commit
d3c16d7d
authored
Dec 15, 1997
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaned up to avoid VC++ warnings.
parent
6bfad104
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
18 deletions
+36
-18
src/Persistence/cPickleCache.c
src/Persistence/cPickleCache.c
+12
-6
src/ZODB/cPickleCache.c
src/ZODB/cPickleCache.c
+12
-6
src/persistent/cPickleCache.c
src/persistent/cPickleCache.c
+12
-6
No files found.
src/Persistence/cPickleCache.c
View file @
d3c16d7d
/*
/*
$Id: cPickleCache.c,v 1.1
1 1997/12/10 22:20:43
jim Exp $
$Id: cPickleCache.c,v 1.1
2 1997/12/15 15:25:09
jim Exp $
C implementation of a pickle jar cache.
C implementation of a pickle jar cache.
Copyright
Copyright
Copyright 1996 Digital Creations, L.C., 910 Princess Anne
Copyright 1996 Digital Creations, L.C., 910 Princess Anne
...
@@ -11,12 +12,13 @@
...
@@ -11,12 +12,13 @@
rights reserved.
rights reserved.
***************************************************************************/
***************************************************************************/
static
char
*
what_string
=
"$Id: cPickleCache.c,v 1.1
1 1997/12/10 22:20:43
jim Exp $"
;
static
char
*
what_string
=
"$Id: cPickleCache.c,v 1.1
2 1997/12/15 15:25:09
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))
#define UNLESS_ASSIGN(V,E) ASSIGN(V,E) UNLESS(V)
#define UNLESS_ASSIGN(V,E) ASSIGN(V,E) UNLESS(V)
#define Py_ASSIGN(P,E) if(!PyObject_AssignExpression(&(P),(E))) return NULL
#define Py_ASSIGN(P,E) if(!PyObject_AssignExpression(&(P),(E))) return NULL
#define OBJECT(O) ((PyObject*)O)
#include "cPersistence.h"
#include "cPersistence.h"
#include <time.h>
#include <time.h>
...
@@ -71,7 +73,6 @@ static PyObject *PATimeType=NULL;
...
@@ -71,7 +73,6 @@ static PyObject *PATimeType=NULL;
static
int
static
int
gc_item
(
ccobject
*
self
,
PyObject
*
key
,
PyObject
*
v
,
time_t
now
,
time_t
dt
)
gc_item
(
ccobject
*
self
,
PyObject
*
key
,
PyObject
*
v
,
time_t
now
,
time_t
dt
)
{
{
PyObject
*
atime
;
time_t
t
;
time_t
t
;
if
(
v
&&
key
)
if
(
v
&&
key
)
...
@@ -317,7 +318,7 @@ cc_report(ccobject *self, PyObject *args)
...
@@ -317,7 +318,7 @@ cc_report(ccobject *self, PyObject *args)
{
{
if
(
v
->
ob_type
==
(
PyTypeObject
*
)
PATimeType
if
(
v
->
ob_type
==
(
PyTypeObject
*
)
PATimeType
&&
(
&&
(
(
t
&&
((
PATimeobject
*
)
v
)
->
object
->
ob_type
==
t
)
(
t
&&
OBJECT
(((
PATimeobject
*
)
v
)
->
object
->
ob_type
)
==
t
)
||
!
t
))
||
!
t
))
printf
(
"%d
\t
%p
\t
%s
\t
%ld
\t
%d
\t
%ld
\n
"
,
printf
(
"%d
\t
%p
\t
%s
\t
%ld
\t
%d
\t
%ld
\n
"
,
(((
PATimeobject
*
)
v
)
->
object
->
oid
),
(((
PATimeobject
*
)
v
)
->
object
->
oid
),
...
@@ -326,7 +327,7 @@ cc_report(ccobject *self, PyObject *args)
...
@@ -326,7 +327,7 @@ cc_report(ccobject *self, PyObject *args)
(
long
)(((
PATimeobject
*
)
v
)
->
object
->
ob_refcnt
),
(
long
)(((
PATimeobject
*
)
v
)
->
object
->
ob_refcnt
),
(((
PATimeobject
*
)
v
)
->
object
->
state
),
(((
PATimeobject
*
)
v
)
->
object
->
state
),
(
long
)(((
PATimeobject
*
)
v
)
->
object
->
atime
)
);
(
long
)(((
PATimeobject
*
)
v
)
->
object
->
atime
)
);
else
if
((
t
&&
((
PATimeobject
*
)
v
)
->
object
->
ob_type
==
t
)
else
if
((
t
&&
OBJECT
(((
PATimeobject
*
)
v
)
->
object
->
ob_type
)
==
t
)
||
!
t
)
||
!
t
)
printf
(
"%d
\t
%p
\t
%s
\t
%ld
\t
%d
\n
"
,
printf
(
"%d
\t
%p
\t
%s
\t
%ld
\t
%d
\n
"
,
(((
cPersistentObject
*
)
v
)
->
oid
),
(((
cPersistentObject
*
)
v
)
->
oid
),
...
@@ -612,7 +613,7 @@ void
...
@@ -612,7 +613,7 @@ void
initcPickleCache
()
initcPickleCache
()
{
{
PyObject
*
m
,
*
d
;
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.1
1
$"
;
char
*
rev
=
"$Revision: 1.1
2
$"
;
Cctype
.
ob_type
=&
PyType_Type
;
Cctype
.
ob_type
=&
PyType_Type
;
...
@@ -635,11 +636,16 @@ initcPickleCache()
...
@@ -635,11 +636,16 @@ initcPickleCache()
PyString_FromStringAndSize
(
rev
+
11
,
strlen
(
rev
+
11
)
-
2
));
PyString_FromStringAndSize
(
rev
+
11
,
strlen
(
rev
+
11
)
-
2
));
#include "dcprotect.h"
if
(
PyErr_Occurred
())
Py_FatalError
(
"can't initialize module cCache"
);
if
(
PyErr_Occurred
())
Py_FatalError
(
"can't initialize module cCache"
);
}
}
/******************************************************************************
/******************************************************************************
$Log: cPickleCache.c,v $
$Log: cPickleCache.c,v $
Revision 1.12 1997/12/15 15:25:09 jim
Cleaned up to avoid VC++ warnings.
Revision 1.11 1997/12/10 22:20:43 jim
Revision 1.11 1997/12/10 22:20:43 jim
Added has_key method.
Added has_key method.
...
...
src/ZODB/cPickleCache.c
View file @
d3c16d7d
/*
/*
$Id: cPickleCache.c,v 1.1
1 1997/12/10 22:20:43
jim Exp $
$Id: cPickleCache.c,v 1.1
2 1997/12/15 15:25:09
jim Exp $
C implementation of a pickle jar cache.
C implementation of a pickle jar cache.
Copyright
Copyright
Copyright 1996 Digital Creations, L.C., 910 Princess Anne
Copyright 1996 Digital Creations, L.C., 910 Princess Anne
...
@@ -11,12 +12,13 @@
...
@@ -11,12 +12,13 @@
rights reserved.
rights reserved.
***************************************************************************/
***************************************************************************/
static
char
*
what_string
=
"$Id: cPickleCache.c,v 1.1
1 1997/12/10 22:20:43
jim Exp $"
;
static
char
*
what_string
=
"$Id: cPickleCache.c,v 1.1
2 1997/12/15 15:25:09
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))
#define UNLESS_ASSIGN(V,E) ASSIGN(V,E) UNLESS(V)
#define UNLESS_ASSIGN(V,E) ASSIGN(V,E) UNLESS(V)
#define Py_ASSIGN(P,E) if(!PyObject_AssignExpression(&(P),(E))) return NULL
#define Py_ASSIGN(P,E) if(!PyObject_AssignExpression(&(P),(E))) return NULL
#define OBJECT(O) ((PyObject*)O)
#include "cPersistence.h"
#include "cPersistence.h"
#include <time.h>
#include <time.h>
...
@@ -71,7 +73,6 @@ static PyObject *PATimeType=NULL;
...
@@ -71,7 +73,6 @@ static PyObject *PATimeType=NULL;
static
int
static
int
gc_item
(
ccobject
*
self
,
PyObject
*
key
,
PyObject
*
v
,
time_t
now
,
time_t
dt
)
gc_item
(
ccobject
*
self
,
PyObject
*
key
,
PyObject
*
v
,
time_t
now
,
time_t
dt
)
{
{
PyObject
*
atime
;
time_t
t
;
time_t
t
;
if
(
v
&&
key
)
if
(
v
&&
key
)
...
@@ -317,7 +318,7 @@ cc_report(ccobject *self, PyObject *args)
...
@@ -317,7 +318,7 @@ cc_report(ccobject *self, PyObject *args)
{
{
if
(
v
->
ob_type
==
(
PyTypeObject
*
)
PATimeType
if
(
v
->
ob_type
==
(
PyTypeObject
*
)
PATimeType
&&
(
&&
(
(
t
&&
((
PATimeobject
*
)
v
)
->
object
->
ob_type
==
t
)
(
t
&&
OBJECT
(((
PATimeobject
*
)
v
)
->
object
->
ob_type
)
==
t
)
||
!
t
))
||
!
t
))
printf
(
"%d
\t
%p
\t
%s
\t
%ld
\t
%d
\t
%ld
\n
"
,
printf
(
"%d
\t
%p
\t
%s
\t
%ld
\t
%d
\t
%ld
\n
"
,
(((
PATimeobject
*
)
v
)
->
object
->
oid
),
(((
PATimeobject
*
)
v
)
->
object
->
oid
),
...
@@ -326,7 +327,7 @@ cc_report(ccobject *self, PyObject *args)
...
@@ -326,7 +327,7 @@ cc_report(ccobject *self, PyObject *args)
(
long
)(((
PATimeobject
*
)
v
)
->
object
->
ob_refcnt
),
(
long
)(((
PATimeobject
*
)
v
)
->
object
->
ob_refcnt
),
(((
PATimeobject
*
)
v
)
->
object
->
state
),
(((
PATimeobject
*
)
v
)
->
object
->
state
),
(
long
)(((
PATimeobject
*
)
v
)
->
object
->
atime
)
);
(
long
)(((
PATimeobject
*
)
v
)
->
object
->
atime
)
);
else
if
((
t
&&
((
PATimeobject
*
)
v
)
->
object
->
ob_type
==
t
)
else
if
((
t
&&
OBJECT
(((
PATimeobject
*
)
v
)
->
object
->
ob_type
)
==
t
)
||
!
t
)
||
!
t
)
printf
(
"%d
\t
%p
\t
%s
\t
%ld
\t
%d
\n
"
,
printf
(
"%d
\t
%p
\t
%s
\t
%ld
\t
%d
\n
"
,
(((
cPersistentObject
*
)
v
)
->
oid
),
(((
cPersistentObject
*
)
v
)
->
oid
),
...
@@ -612,7 +613,7 @@ void
...
@@ -612,7 +613,7 @@ void
initcPickleCache
()
initcPickleCache
()
{
{
PyObject
*
m
,
*
d
;
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.1
1
$"
;
char
*
rev
=
"$Revision: 1.1
2
$"
;
Cctype
.
ob_type
=&
PyType_Type
;
Cctype
.
ob_type
=&
PyType_Type
;
...
@@ -635,11 +636,16 @@ initcPickleCache()
...
@@ -635,11 +636,16 @@ initcPickleCache()
PyString_FromStringAndSize
(
rev
+
11
,
strlen
(
rev
+
11
)
-
2
));
PyString_FromStringAndSize
(
rev
+
11
,
strlen
(
rev
+
11
)
-
2
));
#include "dcprotect.h"
if
(
PyErr_Occurred
())
Py_FatalError
(
"can't initialize module cCache"
);
if
(
PyErr_Occurred
())
Py_FatalError
(
"can't initialize module cCache"
);
}
}
/******************************************************************************
/******************************************************************************
$Log: cPickleCache.c,v $
$Log: cPickleCache.c,v $
Revision 1.12 1997/12/15 15:25:09 jim
Cleaned up to avoid VC++ warnings.
Revision 1.11 1997/12/10 22:20:43 jim
Revision 1.11 1997/12/10 22:20:43 jim
Added has_key method.
Added has_key method.
...
...
src/persistent/cPickleCache.c
View file @
d3c16d7d
/*
/*
$Id: cPickleCache.c,v 1.1
1 1997/12/10 22:20:43
jim Exp $
$Id: cPickleCache.c,v 1.1
2 1997/12/15 15:25:09
jim Exp $
C implementation of a pickle jar cache.
C implementation of a pickle jar cache.
Copyright
Copyright
Copyright 1996 Digital Creations, L.C., 910 Princess Anne
Copyright 1996 Digital Creations, L.C., 910 Princess Anne
...
@@ -11,12 +12,13 @@
...
@@ -11,12 +12,13 @@
rights reserved.
rights reserved.
***************************************************************************/
***************************************************************************/
static
char
*
what_string
=
"$Id: cPickleCache.c,v 1.1
1 1997/12/10 22:20:43
jim Exp $"
;
static
char
*
what_string
=
"$Id: cPickleCache.c,v 1.1
2 1997/12/15 15:25:09
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))
#define UNLESS_ASSIGN(V,E) ASSIGN(V,E) UNLESS(V)
#define UNLESS_ASSIGN(V,E) ASSIGN(V,E) UNLESS(V)
#define Py_ASSIGN(P,E) if(!PyObject_AssignExpression(&(P),(E))) return NULL
#define Py_ASSIGN(P,E) if(!PyObject_AssignExpression(&(P),(E))) return NULL
#define OBJECT(O) ((PyObject*)O)
#include "cPersistence.h"
#include "cPersistence.h"
#include <time.h>
#include <time.h>
...
@@ -71,7 +73,6 @@ static PyObject *PATimeType=NULL;
...
@@ -71,7 +73,6 @@ static PyObject *PATimeType=NULL;
static
int
static
int
gc_item
(
ccobject
*
self
,
PyObject
*
key
,
PyObject
*
v
,
time_t
now
,
time_t
dt
)
gc_item
(
ccobject
*
self
,
PyObject
*
key
,
PyObject
*
v
,
time_t
now
,
time_t
dt
)
{
{
PyObject
*
atime
;
time_t
t
;
time_t
t
;
if
(
v
&&
key
)
if
(
v
&&
key
)
...
@@ -317,7 +318,7 @@ cc_report(ccobject *self, PyObject *args)
...
@@ -317,7 +318,7 @@ cc_report(ccobject *self, PyObject *args)
{
{
if
(
v
->
ob_type
==
(
PyTypeObject
*
)
PATimeType
if
(
v
->
ob_type
==
(
PyTypeObject
*
)
PATimeType
&&
(
&&
(
(
t
&&
((
PATimeobject
*
)
v
)
->
object
->
ob_type
==
t
)
(
t
&&
OBJECT
(((
PATimeobject
*
)
v
)
->
object
->
ob_type
)
==
t
)
||
!
t
))
||
!
t
))
printf
(
"%d
\t
%p
\t
%s
\t
%ld
\t
%d
\t
%ld
\n
"
,
printf
(
"%d
\t
%p
\t
%s
\t
%ld
\t
%d
\t
%ld
\n
"
,
(((
PATimeobject
*
)
v
)
->
object
->
oid
),
(((
PATimeobject
*
)
v
)
->
object
->
oid
),
...
@@ -326,7 +327,7 @@ cc_report(ccobject *self, PyObject *args)
...
@@ -326,7 +327,7 @@ cc_report(ccobject *self, PyObject *args)
(
long
)(((
PATimeobject
*
)
v
)
->
object
->
ob_refcnt
),
(
long
)(((
PATimeobject
*
)
v
)
->
object
->
ob_refcnt
),
(((
PATimeobject
*
)
v
)
->
object
->
state
),
(((
PATimeobject
*
)
v
)
->
object
->
state
),
(
long
)(((
PATimeobject
*
)
v
)
->
object
->
atime
)
);
(
long
)(((
PATimeobject
*
)
v
)
->
object
->
atime
)
);
else
if
((
t
&&
((
PATimeobject
*
)
v
)
->
object
->
ob_type
==
t
)
else
if
((
t
&&
OBJECT
(((
PATimeobject
*
)
v
)
->
object
->
ob_type
)
==
t
)
||
!
t
)
||
!
t
)
printf
(
"%d
\t
%p
\t
%s
\t
%ld
\t
%d
\n
"
,
printf
(
"%d
\t
%p
\t
%s
\t
%ld
\t
%d
\n
"
,
(((
cPersistentObject
*
)
v
)
->
oid
),
(((
cPersistentObject
*
)
v
)
->
oid
),
...
@@ -612,7 +613,7 @@ void
...
@@ -612,7 +613,7 @@ void
initcPickleCache
()
initcPickleCache
()
{
{
PyObject
*
m
,
*
d
;
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.1
1
$"
;
char
*
rev
=
"$Revision: 1.1
2
$"
;
Cctype
.
ob_type
=&
PyType_Type
;
Cctype
.
ob_type
=&
PyType_Type
;
...
@@ -635,11 +636,16 @@ initcPickleCache()
...
@@ -635,11 +636,16 @@ initcPickleCache()
PyString_FromStringAndSize
(
rev
+
11
,
strlen
(
rev
+
11
)
-
2
));
PyString_FromStringAndSize
(
rev
+
11
,
strlen
(
rev
+
11
)
-
2
));
#include "dcprotect.h"
if
(
PyErr_Occurred
())
Py_FatalError
(
"can't initialize module cCache"
);
if
(
PyErr_Occurred
())
Py_FatalError
(
"can't initialize module cCache"
);
}
}
/******************************************************************************
/******************************************************************************
$Log: cPickleCache.c,v $
$Log: cPickleCache.c,v $
Revision 1.12 1997/12/15 15:25:09 jim
Cleaned up to avoid VC++ warnings.
Revision 1.11 1997/12/10 22:20:43 jim
Revision 1.11 1997/12/10 22:20:43 jim
Added has_key method.
Added has_key method.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment