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
5e8ef960
Commit
5e8ef960
authored
Jun 20, 2001
by
matt@zope.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix result return from ConflictError trap
parent
bc697029
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
10 deletions
+15
-10
src/BTrees/BTreeModuleTemplate.c
src/BTrees/BTreeModuleTemplate.c
+7
-7
src/BTrees/BucketTemplate.c
src/BTrees/BucketTemplate.c
+3
-1
src/BTrees/MergeTemplate.c
src/BTrees/MergeTemplate.c
+5
-2
No files found.
src/BTrees/BTreeModuleTemplate.c
View file @
5e8ef960
...
@@ -341,7 +341,7 @@ static char BTree_module_documentation[] =
...
@@ -341,7 +341,7 @@ static char BTree_module_documentation[] =
"
\n
"
"
\n
"
MASTER_ID
MASTER_ID
BTREEITEMSTEMPLATE_C
BTREEITEMSTEMPLATE_C
"$Id: BTreeModuleTemplate.c,v 1.1
2 2001/06/20 14:48:51
matt Exp $
\n
"
"$Id: BTreeModuleTemplate.c,v 1.1
3 2001/06/20 19:32:55
matt Exp $
\n
"
BTREETEMPLATE_C
BTREETEMPLATE_C
BUCKETTEMPLATE_C
BUCKETTEMPLATE_C
KEYMACROS_H
KEYMACROS_H
...
@@ -395,19 +395,19 @@ INITMODULE (void)
...
@@ -395,19 +395,19 @@ INITMODULE (void)
c
=
PyObject_GetAttrString
(
m
,
"ConflictError"
);
c
=
PyObject_GetAttrString
(
m
,
"ConflictError"
);
if
(
c
!=
NULL
)
if
(
c
!=
NULL
)
ConflictError
=
c
;
ConflictError
=
c
;
else
ConflictError
=
PyExc_ValueError
;
Py_DECREF
(
m
);
Py_DECREF
(
m
);
}
else
ConflictError
=
PyExc_ValueError
;
}
if
(
ConflictError
==
NULL
)
{
Py_INCREF
(
PyExc_ValueError
);
ConflictError
=
PyExc_ValueError
;
}
#else
#else
BTreeType
.
tp_getattro
=
PyExtensionClassCAPI
->
getattro
;
BTreeType
.
tp_getattro
=
PyExtensionClassCAPI
->
getattro
;
BucketType
.
tp_getattro
=
PyExtensionClassCAPI
->
getattro
;
BucketType
.
tp_getattro
=
PyExtensionClassCAPI
->
getattro
;
SetType
.
tp_getattro
=
PyExtensionClassCAPI
->
getattro
;
SetType
.
tp_getattro
=
PyExtensionClassCAPI
->
getattro
;
TreeSetType
.
tp_getattro
=
PyExtensionClassCAPI
->
getattro
;
TreeSetType
.
tp_getattro
=
PyExtensionClassCAPI
->
getattro
;
ConflictError
=
PyExc_ValueError
;
/* MergeTemplate checks anyway */
#endif
#endif
BTreeItemsType
.
ob_type
=&
PyType_Type
;
BTreeItemsType
.
ob_type
=&
PyType_Type
;
...
@@ -427,7 +427,7 @@ INITMODULE (void)
...
@@ -427,7 +427,7 @@ INITMODULE (void)
d
=
PyModule_GetDict
(
m
);
d
=
PyModule_GetDict
(
m
);
PyDict_SetItemString
(
d
,
"__version__"
,
PyDict_SetItemString
(
d
,
"__version__"
,
PyString_FromString
(
"$Revision: 1.1
2
$"
));
PyString_FromString
(
"$Revision: 1.1
3
$"
));
PyExtensionClass_Export
(
d
,
MOD_NAME_PREFIX
"Bucket"
,
BucketType
);
PyExtensionClass_Export
(
d
,
MOD_NAME_PREFIX
"Bucket"
,
BucketType
);
PyExtensionClass_Export
(
d
,
MOD_NAME_PREFIX
"BTree"
,
BTreeType
);
PyExtensionClass_Export
(
d
,
MOD_NAME_PREFIX
"BTree"
,
BTreeType
);
...
...
src/BTrees/BucketTemplate.c
View file @
5e8ef960
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
****************************************************************************/
****************************************************************************/
#define BUCKETTEMPLATE_C "$Id: BucketTemplate.c,v 1.1
5 2001/06/20 14:48:51
matt Exp $\n"
#define BUCKETTEMPLATE_C "$Id: BucketTemplate.c,v 1.1
6 2001/06/20 19:32:55
matt Exp $\n"
/*
/*
** _bucket_get
** _bucket_get
...
@@ -1137,6 +1137,8 @@ bucket__p_resolveConflict(Bucket *self, PyObject *args)
...
@@ -1137,6 +1137,8 @@ bucket__p_resolveConflict(Bucket *self, PyObject *args)
Py_XDECREF
(
error
);
Py_XDECREF
(
error
);
PyErr_Restore
(
ConflictError
,
value
,
traceback
);
PyErr_Restore
(
ConflictError
,
value
,
traceback
);
}
}
return
result
;
}
}
#endif
#endif
...
...
src/BTrees/MergeTemplate.c
View file @
5e8ef960
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
****************************************************************************/
****************************************************************************/
#define MERGETEMPLATE_C "$Id: MergeTemplate.c,v 1.
6 2001/06/20 14:48:51
matt Exp $\n"
#define MERGETEMPLATE_C "$Id: MergeTemplate.c,v 1.
7 2001/06/20 19:32:55
matt Exp $\n"
/****************************************************************************
/****************************************************************************
Set operations
Set operations
...
@@ -110,7 +110,10 @@ merge_error(int p1, int p2, int p3, int reason)
...
@@ -110,7 +110,10 @@ merge_error(int p1, int p2, int p3, int reason)
PyObject
*
r
;
PyObject
*
r
;
UNLESS
(
r
=
Py_BuildValue
(
"iiii"
,
p1
,
p2
,
p3
,
reason
))
r
=
Py_None
;
UNLESS
(
r
=
Py_BuildValue
(
"iiii"
,
p1
,
p2
,
p3
,
reason
))
r
=
Py_None
;
if
(
ConflictError
==
NULL
)
ConflictError
=
PyExc_ValueError
;
if
(
ConflictError
==
NULL
)
{
ConflictError
=
PyExc_ValueError
;
Py_INCREF
(
ConflictError
);
}
PyErr_SetObject
(
ConflictError
,
r
);
PyErr_SetObject
(
ConflictError
,
r
);
if
(
r
!=
Py_None
)
if
(
r
!=
Py_None
)
{
{
...
...
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