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
adc281ba
Commit
adc281ba
authored
Mar 20, 1997
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in reinit.
parent
5a97a90e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
15 deletions
+45
-15
src/Persistence/cPersistence.c
src/Persistence/cPersistence.c
+15
-5
src/ZODB/cPersistence.c
src/ZODB/cPersistence.c
+15
-5
src/persistent/cPersistence.c
src/persistent/cPersistence.c
+15
-5
No files found.
src/Persistence/cPersistence.c
View file @
adc281ba
/*
/*
$Id: cPersistence.c,v 1.
5 1997/03/14 22:59:34
jim Exp $
$Id: cPersistence.c,v 1.
6 1997/03/20 20:58:25
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.
5 1997/03/14 22:59:34
jim Exp $"
;
static
char
*
what_string
=
"$Id: cPersistence.c,v 1.
6 1997/03/20 20:58:25
jim Exp $"
;
#include <time.h>
#include <time.h>
#include "cPersistence.h"
#include "cPersistence.h"
...
@@ -294,9 +294,16 @@ Per__p___reinit__(cPersistentObject *self, PyObject *args)
...
@@ -294,9 +294,16 @@ Per__p___reinit__(cPersistentObject *self, PyObject *args)
Py_INCREF
(
oid
);
Py_INCREF
(
oid
);
ASSIGN
(
self
->
oid
,
oid
);
ASSIGN
(
self
->
oid
,
oid
);
}
}
if
(
self
->
oid
==
oid
||
PyObject_Compare
(
self
->
oid
,
oid
))
if
((
self
->
oid
==
oid
||
PyObject_Compare
(
self
->
oid
,
oid
)
==
0
)
&&
self
->
state
==
cPersistent_UPTODATE_STATE
)
{
{
UNLESS
(
args
=
PyObject_GetAttr
(
copy
,
py___dict__
))
return
NULL
;
UNLESS
(
args
=
PyObject_GetAttr
(
copy
,
py___dict__
))
{
printf
(
"Could not get __dict__ of a %s,
\n
"
,
self
->
ob_type
->
tp_name
);
PyObject_Print
(
self
,
stdout
,
0
);
printf
(
"
\n\n
"
);
return
NULL
;
}
ASSIGN
(
INSTANCE_DICT
(
self
),
args
);
ASSIGN
(
INSTANCE_DICT
(
self
),
args
);
self
->
state
=
GHOST_STATE
;
self
->
state
=
GHOST_STATE
;
}
}
...
@@ -720,7 +727,7 @@ void
...
@@ -720,7 +727,7 @@ void
initcPersistence
()
initcPersistence
()
{
{
PyObject
*
m
,
*
d
;
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.
5
$"
;
char
*
rev
=
"$Revision: 1.
6
$"
;
PATimeType
.
ob_type
=&
PyType_Type
;
PATimeType
.
ob_type
=&
PyType_Type
;
...
@@ -747,6 +754,9 @@ initcPersistence()
...
@@ -747,6 +754,9 @@ initcPersistence()
/****************************************************************************
/****************************************************************************
$Log: cPersistence.c,v $
$Log: cPersistence.c,v $
Revision 1.6 1997/03/20 20:58:25 jim
Fixed bug in reinit.
Revision 1.5 1997/03/14 22:59:34 jim
Revision 1.5 1997/03/14 22:59:34 jim
Changed the way Per_setstate was exported to get rid of compilation
Changed the way Per_setstate was exported to get rid of compilation
error.
error.
...
...
src/ZODB/cPersistence.c
View file @
adc281ba
/*
/*
$Id: cPersistence.c,v 1.
5 1997/03/14 22:59:34
jim Exp $
$Id: cPersistence.c,v 1.
6 1997/03/20 20:58:25
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.
5 1997/03/14 22:59:34
jim Exp $"
;
static
char
*
what_string
=
"$Id: cPersistence.c,v 1.
6 1997/03/20 20:58:25
jim Exp $"
;
#include <time.h>
#include <time.h>
#include "cPersistence.h"
#include "cPersistence.h"
...
@@ -294,9 +294,16 @@ Per__p___reinit__(cPersistentObject *self, PyObject *args)
...
@@ -294,9 +294,16 @@ Per__p___reinit__(cPersistentObject *self, PyObject *args)
Py_INCREF
(
oid
);
Py_INCREF
(
oid
);
ASSIGN
(
self
->
oid
,
oid
);
ASSIGN
(
self
->
oid
,
oid
);
}
}
if
(
self
->
oid
==
oid
||
PyObject_Compare
(
self
->
oid
,
oid
))
if
((
self
->
oid
==
oid
||
PyObject_Compare
(
self
->
oid
,
oid
)
==
0
)
&&
self
->
state
==
cPersistent_UPTODATE_STATE
)
{
{
UNLESS
(
args
=
PyObject_GetAttr
(
copy
,
py___dict__
))
return
NULL
;
UNLESS
(
args
=
PyObject_GetAttr
(
copy
,
py___dict__
))
{
printf
(
"Could not get __dict__ of a %s,
\n
"
,
self
->
ob_type
->
tp_name
);
PyObject_Print
(
self
,
stdout
,
0
);
printf
(
"
\n\n
"
);
return
NULL
;
}
ASSIGN
(
INSTANCE_DICT
(
self
),
args
);
ASSIGN
(
INSTANCE_DICT
(
self
),
args
);
self
->
state
=
GHOST_STATE
;
self
->
state
=
GHOST_STATE
;
}
}
...
@@ -720,7 +727,7 @@ void
...
@@ -720,7 +727,7 @@ void
initcPersistence
()
initcPersistence
()
{
{
PyObject
*
m
,
*
d
;
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.
5
$"
;
char
*
rev
=
"$Revision: 1.
6
$"
;
PATimeType
.
ob_type
=&
PyType_Type
;
PATimeType
.
ob_type
=&
PyType_Type
;
...
@@ -747,6 +754,9 @@ initcPersistence()
...
@@ -747,6 +754,9 @@ initcPersistence()
/****************************************************************************
/****************************************************************************
$Log: cPersistence.c,v $
$Log: cPersistence.c,v $
Revision 1.6 1997/03/20 20:58:25 jim
Fixed bug in reinit.
Revision 1.5 1997/03/14 22:59:34 jim
Revision 1.5 1997/03/14 22:59:34 jim
Changed the way Per_setstate was exported to get rid of compilation
Changed the way Per_setstate was exported to get rid of compilation
error.
error.
...
...
src/persistent/cPersistence.c
View file @
adc281ba
/*
/*
$Id: cPersistence.c,v 1.
5 1997/03/14 22:59:34
jim Exp $
$Id: cPersistence.c,v 1.
6 1997/03/20 20:58:25
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.
5 1997/03/14 22:59:34
jim Exp $"
;
static
char
*
what_string
=
"$Id: cPersistence.c,v 1.
6 1997/03/20 20:58:25
jim Exp $"
;
#include <time.h>
#include <time.h>
#include "cPersistence.h"
#include "cPersistence.h"
...
@@ -294,9 +294,16 @@ Per__p___reinit__(cPersistentObject *self, PyObject *args)
...
@@ -294,9 +294,16 @@ Per__p___reinit__(cPersistentObject *self, PyObject *args)
Py_INCREF
(
oid
);
Py_INCREF
(
oid
);
ASSIGN
(
self
->
oid
,
oid
);
ASSIGN
(
self
->
oid
,
oid
);
}
}
if
(
self
->
oid
==
oid
||
PyObject_Compare
(
self
->
oid
,
oid
))
if
((
self
->
oid
==
oid
||
PyObject_Compare
(
self
->
oid
,
oid
)
==
0
)
&&
self
->
state
==
cPersistent_UPTODATE_STATE
)
{
{
UNLESS
(
args
=
PyObject_GetAttr
(
copy
,
py___dict__
))
return
NULL
;
UNLESS
(
args
=
PyObject_GetAttr
(
copy
,
py___dict__
))
{
printf
(
"Could not get __dict__ of a %s,
\n
"
,
self
->
ob_type
->
tp_name
);
PyObject_Print
(
self
,
stdout
,
0
);
printf
(
"
\n\n
"
);
return
NULL
;
}
ASSIGN
(
INSTANCE_DICT
(
self
),
args
);
ASSIGN
(
INSTANCE_DICT
(
self
),
args
);
self
->
state
=
GHOST_STATE
;
self
->
state
=
GHOST_STATE
;
}
}
...
@@ -720,7 +727,7 @@ void
...
@@ -720,7 +727,7 @@ void
initcPersistence
()
initcPersistence
()
{
{
PyObject
*
m
,
*
d
;
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.
5
$"
;
char
*
rev
=
"$Revision: 1.
6
$"
;
PATimeType
.
ob_type
=&
PyType_Type
;
PATimeType
.
ob_type
=&
PyType_Type
;
...
@@ -747,6 +754,9 @@ initcPersistence()
...
@@ -747,6 +754,9 @@ initcPersistence()
/****************************************************************************
/****************************************************************************
$Log: cPersistence.c,v $
$Log: cPersistence.c,v $
Revision 1.6 1997/03/20 20:58:25 jim
Fixed bug in reinit.
Revision 1.5 1997/03/14 22:59:34 jim
Revision 1.5 1997/03/14 22:59:34 jim
Changed the way Per_setstate was exported to get rid of compilation
Changed the way Per_setstate was exported to get rid of compilation
error.
error.
...
...
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