Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
945a2e23
Commit
945a2e23
authored
Sep 24, 2005
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Collector #1879: applied patch by Dieter Maurer to fix a bug in
ac_aquire() ignoring the default argument
parent
4f1ca2a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
doc/CHANGES.txt
doc/CHANGES.txt
+3
-0
lib/python/Acquisition/_Acquisition.c
lib/python/Acquisition/_Acquisition.c
+23
-0
No files found.
doc/CHANGES.txt
View file @
945a2e23
...
...
@@ -31,6 +31,9 @@ Zope Changes
Bugs Fixed
- Collector #1879: applied patch by Dieter Maurer to fix a bug in
ac_aquire() ignoring the default argument
- Collector #1864, #1906: fixed header normalization in appendHeader()
- Collector #1899: fixed migration issue when using export/import for
...
...
lib/python/Acquisition/_Acquisition.c
View file @
945a2e23
...
...
@@ -1059,6 +1059,7 @@ Wrapper_acquire_method(Wrapper *self, PyObject *args, PyObject *kw)
PyObject
*
expl
=
0
,
*
defalt
=
0
;
int
explicit
=
1
;
int
containment
=
0
;
PyObject
*
result
;
/* DM 2005-08-25: argument "default" ignored */
UNLESS
(
PyArg_ParseTupleAndKeywords
(
args
,
kw
,
"O|OOOOi"
,
acquire_args
+
1
,
...
...
@@ -1070,12 +1071,34 @@ Wrapper_acquire_method(Wrapper *self, PyObject *args, PyObject *kw)
if
(
filter
==
Py_None
)
filter
=
0
;
/* DM 2005-08-25: argument "default" ignored -- fix it! */
# if 0
return
Wrapper_findattr
(
self
,
name
,
filter
,
extra
,
OBJECT
(
self
),
1
,
explicit
||
self
->
ob_type
==
(
PyTypeObject
*
)
&
Wrappertype
,
explicit
,
containment
);
# else
result
=
Wrapper_findattr
(
self
,
name
,
filter
,
extra
,
OBJECT
(
self
),
1
,
explicit
||
self
->
ob_type
==
(
PyTypeObject
*
)
&
Wrappertype
,
explicit
,
containment
);
if
(
result
==
NULL
&&
defalt
!=
NULL
)
{
/* as "Python/bltinmodule.c:builtin_getattr" turn
only 'AttributeError' into a default value, such
that e.g. "ConflictError" and errors raised by the filter
are not mapped to the default value.
*/
if
(
PyErr_ExceptionMatches
(
PyExc_AttributeError
))
{
PyErr_Clear
();
Py_INCREF
(
defalt
);
result
=
defalt
;
}
}
return
result
;
# endif
}
static
PyObject
*
Wrapper_inContextOf
(
Wrapper
*
self
,
PyObject
*
args
)
{
...
...
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