Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Acquisition
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
Acquisition
Commits
dd175e54
Commit
dd175e54
authored
Nov 21, 2006
by
Philipp von Weitershausen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Warming up: Make acquisition wrappers have __parent__ in addition to aq_parent
(they point to the same thing).
parent
f89acd0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
_Acquisition.c
_Acquisition.c
+13
-2
No files found.
_Acquisition.c
View file @
dd175e54
...
...
@@ -419,8 +419,18 @@ Wrapper_findattr(Wrapper *self, PyObject *oname,
char
*
name
=
""
;
if
(
PyString_Check
(
oname
))
name
=
PyString_AS_STRING
(
oname
);
if
(
*
name
==
'a'
&&
name
[
1
]
==
'q'
&&
name
[
2
]
==
'_'
)
if
((
r
=
Wrapper_special
(
self
,
name
+
3
,
oname
)))
/* handle aq_ and __parent__ attributes */
if
((
*
name
==
'a'
&&
name
[
1
]
==
'q'
&&
name
[
2
]
==
'_'
)
||
(
strcmp
(
name
,
"__parent__"
)
==
0
))
{
/* __parent__ is an alias to aq_parent */
if
(
strcmp
(
name
,
"__parent__"
)
==
0
)
name
=
"parent"
;
else
name
=
name
+
3
;
if
((
r
=
Wrapper_special
(
self
,
name
,
oname
)))
{
if
(
filter
)
switch
(
apply_filter
(
filter
,
OBJECT
(
self
),
oname
,
r
,
extra
,
orig
))
...
...
@@ -431,6 +441,7 @@ Wrapper_findattr(Wrapper *self, PyObject *oname,
else
return
r
;
}
else
PyErr_Clear
();
}
else
if
(
*
name
==
'_'
&&
name
[
1
]
==
'_'
&&
(
strcmp
(
name
+
2
,
"reduce__"
)
==
0
||
strcmp
(
name
+
2
,
"reduce_ex__"
)
==
0
||
...
...
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