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
679fc2e8
Commit
679fc2e8
authored
Nov 19, 1997
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed filter machinery so that wrapped objects are used as
inst and parent in filter.
parent
d0d9ec96
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
18 deletions
+20
-18
lib/Components/ExtensionClass/Acquisition.c
lib/Components/ExtensionClass/Acquisition.c
+10
-9
lib/Components/ExtensionClass/src/Acquisition.c
lib/Components/ExtensionClass/src/Acquisition.c
+10
-9
No files found.
lib/Components/ExtensionClass/Acquisition.c
View file @
679fc2e8
/*
$Id: Acquisition.c,v 1.1
1 1997/11/07 19:00:34
jim Exp $
$Id: Acquisition.c,v 1.1
2 1997/11/19 13:39:32
jim Exp $
Acquisition Wrappers -- Implementation of acquisition through wrappers
...
...
@@ -379,7 +379,7 @@ Wrapper_acquire(Wrapper *self, PyObject *oname,
else
if
(
has__of__
(
r
))
ASSIGN
(
r
,
CallMethodO
(
r
,
py__of__
,
Build
(
"(O)"
,
self
),
NULL
));
if
(
filter
)
switch
(
apply_filter
(
filter
,
self
->
obj
,
oname
,
r
,
extra
,
orig
))
switch
(
apply_filter
(
filter
,
self
,
oname
,
r
,
extra
,
orig
))
{
case
-
1
:
return
NULL
;
case
1
:
return
r
;
...
...
@@ -623,14 +623,11 @@ static PyMappingMethods Wrapper_as_mapping = {
static
PyObject
*
Wrapper_acquire_method
(
Wrapper
*
self
,
PyObject
*
args
)
{
PyObject
*
name
,
*
filter
=
0
,
*
extra
=
Py_None
,
*
orig
;
PyObject
*
name
,
*
filter
=
0
,
*
extra
=
Py_None
;
UNLESS
(
PyArg_ParseTuple
(
args
,
"O|OO"
,
&
name
,
&
filter
,
&
extra
))
return
NULL
;
if
(
self
->
obj
)
orig
=
self
->
obj
;
else
orig
=
Py_None
;
return
Wrapper_acquire
(
self
,
name
,
filter
,
extra
,
orig
);
return
Wrapper_acquire
(
self
,
name
,
filter
,
extra
,
self
);
}
static
struct
PyMethodDef
Wrapper_methods
[]
=
{
...
...
@@ -755,7 +752,7 @@ void
initAcquisition
()
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.1
1
$"
;
char
*
rev
=
"$Revision: 1.1
2
$"
;
PURE_MIXIN_CLASS
(
Acquirer
,
"Base class for objects that implicitly"
" acquire attributes from containers
\n
"
...
...
@@ -770,7 +767,7 @@ initAcquisition()
/* 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.1
1 1997/11/07 19:00:34
jim Exp $
\n
"
,
"$Id: Acquisition.c,v 1.1
2 1997/11/19 13:39:32
jim Exp $
\n
"
,
(
PyObject
*
)
NULL
,
PYTHON_API_VERSION
);
d
=
PyModule_GetDict
(
m
);
...
...
@@ -792,6 +789,10 @@ initAcquisition()
/*****************************************************************************
$Log: Acquisition.c,v $
Revision 1.12 1997/11/19 13:39:32 jim
Changed filter machinery so that wrapped objects are used as
inst and parent in filter.
Revision 1.11 1997/11/07 19:00:34 jim
Added compile option to implicitly acquire __roles__.
...
...
lib/Components/ExtensionClass/src/Acquisition.c
View file @
679fc2e8
/*
$Id: Acquisition.c,v 1.1
1 1997/11/07 19:00:34
jim Exp $
$Id: Acquisition.c,v 1.1
2 1997/11/19 13:39:32
jim Exp $
Acquisition Wrappers -- Implementation of acquisition through wrappers
...
...
@@ -379,7 +379,7 @@ Wrapper_acquire(Wrapper *self, PyObject *oname,
else
if
(
has__of__
(
r
))
ASSIGN
(
r
,
CallMethodO
(
r
,
py__of__
,
Build
(
"(O)"
,
self
),
NULL
));
if
(
filter
)
switch
(
apply_filter
(
filter
,
self
->
obj
,
oname
,
r
,
extra
,
orig
))
switch
(
apply_filter
(
filter
,
self
,
oname
,
r
,
extra
,
orig
))
{
case
-
1
:
return
NULL
;
case
1
:
return
r
;
...
...
@@ -623,14 +623,11 @@ static PyMappingMethods Wrapper_as_mapping = {
static
PyObject
*
Wrapper_acquire_method
(
Wrapper
*
self
,
PyObject
*
args
)
{
PyObject
*
name
,
*
filter
=
0
,
*
extra
=
Py_None
,
*
orig
;
PyObject
*
name
,
*
filter
=
0
,
*
extra
=
Py_None
;
UNLESS
(
PyArg_ParseTuple
(
args
,
"O|OO"
,
&
name
,
&
filter
,
&
extra
))
return
NULL
;
if
(
self
->
obj
)
orig
=
self
->
obj
;
else
orig
=
Py_None
;
return
Wrapper_acquire
(
self
,
name
,
filter
,
extra
,
orig
);
return
Wrapper_acquire
(
self
,
name
,
filter
,
extra
,
self
);
}
static
struct
PyMethodDef
Wrapper_methods
[]
=
{
...
...
@@ -755,7 +752,7 @@ void
initAcquisition
()
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.1
1
$"
;
char
*
rev
=
"$Revision: 1.1
2
$"
;
PURE_MIXIN_CLASS
(
Acquirer
,
"Base class for objects that implicitly"
" acquire attributes from containers
\n
"
...
...
@@ -770,7 +767,7 @@ initAcquisition()
/* 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.1
1 1997/11/07 19:00:34
jim Exp $
\n
"
,
"$Id: Acquisition.c,v 1.1
2 1997/11/19 13:39:32
jim Exp $
\n
"
,
(
PyObject
*
)
NULL
,
PYTHON_API_VERSION
);
d
=
PyModule_GetDict
(
m
);
...
...
@@ -792,6 +789,10 @@ initAcquisition()
/*****************************************************************************
$Log: Acquisition.c,v $
Revision 1.12 1997/11/19 13:39:32 jim
Changed filter machinery so that wrapped objects are used as
inst and parent in filter.
Revision 1.11 1997/11/07 19:00:34 jim
Added compile option to implicitly acquire __roles__.
...
...
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