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
93e0d14d
Commit
93e0d14d
authored
Oct 21, 2003
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Collector #1056: aq_acquire() ignored the default argument
parent
57c57cff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
doc/CHANGES.txt
doc/CHANGES.txt
+2
-0
lib/Components/ExtensionClass/src/Acquisition.c
lib/Components/ExtensionClass/src/Acquisition.c
+16
-2
No files found.
doc/CHANGES.txt
View file @
93e0d14d
...
...
@@ -16,6 +16,8 @@ Zope Changes
Bugs fixed
- Collector #1056: aq_acquire() ignored the default argument
- Collector #1087: ZPT: "repeat/item/length" did not work as documented
in the Zope Book.
...
...
lib/Components/ExtensionClass/src/Acquisition.c
View file @
93e0d14d
...
...
@@ -1034,6 +1034,7 @@ Wrapper_acquire_method(Wrapper *self, PyObject *args, PyObject *kw)
{
PyObject
*
name
,
*
filter
=
0
,
*
extra
=
Py_None
;
PyObject
*
expl
=
0
,
*
defalt
=
0
;
PyObject
*
result
;
int
explicit
=
1
;
int
containment
=
0
;
...
...
@@ -1047,10 +1048,23 @@ Wrapper_acquire_method(Wrapper *self, PyObject *args, PyObject *kw)
if
(
filter
==
Py_None
)
filter
=
0
;
re
turn
Wrapper_findattr
(
self
,
name
,
filter
,
extra
,
OBJECT
(
self
),
1
,
re
sult
=
Wrapper_findattr
(
self
,
name
,
filter
,
extra
,
OBJECT
(
self
),
1
,
explicit
||
self
->
ob_type
==
(
PyTypeObject
*
)
&
Wrappertype
,
explicit
,
containment
);
if
(
result
==
NULL
&&
defalt
!=
NULL
)
{
/* contrary to "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
;
}
static
PyObject
*
...
...
@@ -1528,7 +1542,7 @@ initAcquisition(void)
/* Create the module and add the functions */
m
=
Py_InitModule4
(
"Acquisition"
,
methods
,
"Provide base classes for acquiring objects
\n\n
"
"$Id: Acquisition.c,v 1.6
1 2003/06/10 15:28:46 shane
Exp $
\n
"
,
"$Id: Acquisition.c,v 1.6
2 2003/10/21 12:43:22 andreasjung
Exp $
\n
"
,
OBJECT
(
NULL
),
PYTHON_API_VERSION
);
d
=
PyModule_GetDict
(
m
);
...
...
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