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
ff05922e
Commit
ff05922e
authored
Mar 24, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rearranged.
parent
be474bc7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
64 deletions
+70
-64
lib/Components/ExtensionClass/Acquisition.c
lib/Components/ExtensionClass/Acquisition.c
+35
-32
lib/Components/ExtensionClass/src/Acquisition.c
lib/Components/ExtensionClass/src/Acquisition.c
+35
-32
No files found.
lib/Components/ExtensionClass/Acquisition.c
View file @
ff05922e
/*
$Id: Acquisition.c,v 1.1
6 1998/03/23 20:23:35
jim Exp $
$Id: Acquisition.c,v 1.1
7 1998/03/24 16:17:01
jim Exp $
Acquisition Wrappers -- Implementation of acquisition through wrappers
...
...
@@ -258,6 +258,35 @@ Wrapper_special(Wrapper *self, char *name, PyObject *oname)
}
}
static
int
apply_filter
(
PyObject
*
filter
,
PyObject
*
inst
,
PyObject
*
oname
,
PyObject
*
r
,
PyObject
*
extra
,
PyObject
*
orig
)
{
PyObject
*
fr
;
int
ir
;
UNLESS
(
fr
=
PyTuple_New
(
5
))
goto
err
;
PyTuple_SET_ITEM
(
fr
,
0
,
orig
);
Py_INCREF
(
orig
);
PyTuple_SET_ITEM
(
fr
,
1
,
inst
);
Py_INCREF
(
inst
);
PyTuple_SET_ITEM
(
fr
,
2
,
oname
);
Py_INCREF
(
oname
);
PyTuple_SET_ITEM
(
fr
,
3
,
r
);
Py_INCREF
(
r
);
PyTuple_SET_ITEM
(
fr
,
4
,
extra
);
Py_INCREF
(
extra
);
UNLESS_ASSIGN
(
fr
,
PyObject_CallObject
(
filter
,
fr
))
goto
err
;
ir
=
PyObject_IsTrue
(
fr
);
Py_DECREF
(
fr
);
if
(
ir
)
return
1
;
Py_DECREF
(
r
);
return
0
;
err:
Py_DECREF
(
r
);
return
-
1
;
}
static
PyObject
*
Wrapper_acquire
(
Wrapper
*
self
,
PyObject
*
oname
,
PyObject
*
filter
,
PyObject
*
extra
,
PyObject
*
orig
,
...
...
@@ -486,35 +515,6 @@ Xaq_getattro(Wrapper *self, PyObject *oname)
return
NULL
;
}
static
int
apply_filter
(
PyObject
*
filter
,
PyObject
*
inst
,
PyObject
*
oname
,
PyObject
*
r
,
PyObject
*
extra
,
PyObject
*
orig
)
{
PyObject
*
fr
;
int
ir
;
UNLESS
(
fr
=
PyTuple_New
(
5
))
goto
err
;
PyTuple_SET_ITEM
(
fr
,
0
,
orig
);
Py_INCREF
(
orig
);
PyTuple_SET_ITEM
(
fr
,
1
,
inst
);
Py_INCREF
(
inst
);
PyTuple_SET_ITEM
(
fr
,
2
,
oname
);
Py_INCREF
(
oname
);
PyTuple_SET_ITEM
(
fr
,
3
,
r
);
Py_INCREF
(
r
);
PyTuple_SET_ITEM
(
fr
,
4
,
extra
);
Py_INCREF
(
extra
);
UNLESS_ASSIGN
(
fr
,
PyObject_CallObject
(
filter
,
fr
))
goto
err
;
ir
=
PyObject_IsTrue
(
fr
);
Py_DECREF
(
fr
);
if
(
ir
)
return
1
;
Py_DECREF
(
r
);
return
0
;
err:
Py_DECREF
(
r
);
return
-
1
;
}
static
int
Wrapper_setattro
(
Wrapper
*
self
,
PyObject
*
name
,
PyObject
*
v
)
{
...
...
@@ -857,7 +857,7 @@ void
initAcquisition
()
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.1
6
$"
;
char
*
rev
=
"$Revision: 1.1
7
$"
;
PURE_MIXIN_CLASS
(
Acquirer
,
"Base class for objects that implicitly"
" acquire attributes from containers
\n
"
...
...
@@ -876,7 +876,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
6 1998/03/23 20:23:35
jim Exp $
\n
"
,
"$Id: Acquisition.c,v 1.1
7 1998/03/24 16:17:01
jim Exp $
\n
"
,
OBJECT
(
NULL
),
PYTHON_API_VERSION
);
d
=
PyModule_GetDict
(
m
);
...
...
@@ -899,6 +899,9 @@ initAcquisition()
/*****************************************************************************
$Log: Acquisition.c,v $
Revision 1.17 1998/03/24 16:17:01 jim
Rearranged.
Revision 1.16 1998/03/23 20:23:35 jim
Added lots of new machinery to handle wrapping of acquired objects.
...
...
lib/Components/ExtensionClass/src/Acquisition.c
View file @
ff05922e
/*
$Id: Acquisition.c,v 1.1
6 1998/03/23 20:23:35
jim Exp $
$Id: Acquisition.c,v 1.1
7 1998/03/24 16:17:01
jim Exp $
Acquisition Wrappers -- Implementation of acquisition through wrappers
...
...
@@ -258,6 +258,35 @@ Wrapper_special(Wrapper *self, char *name, PyObject *oname)
}
}
static
int
apply_filter
(
PyObject
*
filter
,
PyObject
*
inst
,
PyObject
*
oname
,
PyObject
*
r
,
PyObject
*
extra
,
PyObject
*
orig
)
{
PyObject
*
fr
;
int
ir
;
UNLESS
(
fr
=
PyTuple_New
(
5
))
goto
err
;
PyTuple_SET_ITEM
(
fr
,
0
,
orig
);
Py_INCREF
(
orig
);
PyTuple_SET_ITEM
(
fr
,
1
,
inst
);
Py_INCREF
(
inst
);
PyTuple_SET_ITEM
(
fr
,
2
,
oname
);
Py_INCREF
(
oname
);
PyTuple_SET_ITEM
(
fr
,
3
,
r
);
Py_INCREF
(
r
);
PyTuple_SET_ITEM
(
fr
,
4
,
extra
);
Py_INCREF
(
extra
);
UNLESS_ASSIGN
(
fr
,
PyObject_CallObject
(
filter
,
fr
))
goto
err
;
ir
=
PyObject_IsTrue
(
fr
);
Py_DECREF
(
fr
);
if
(
ir
)
return
1
;
Py_DECREF
(
r
);
return
0
;
err:
Py_DECREF
(
r
);
return
-
1
;
}
static
PyObject
*
Wrapper_acquire
(
Wrapper
*
self
,
PyObject
*
oname
,
PyObject
*
filter
,
PyObject
*
extra
,
PyObject
*
orig
,
...
...
@@ -486,35 +515,6 @@ Xaq_getattro(Wrapper *self, PyObject *oname)
return
NULL
;
}
static
int
apply_filter
(
PyObject
*
filter
,
PyObject
*
inst
,
PyObject
*
oname
,
PyObject
*
r
,
PyObject
*
extra
,
PyObject
*
orig
)
{
PyObject
*
fr
;
int
ir
;
UNLESS
(
fr
=
PyTuple_New
(
5
))
goto
err
;
PyTuple_SET_ITEM
(
fr
,
0
,
orig
);
Py_INCREF
(
orig
);
PyTuple_SET_ITEM
(
fr
,
1
,
inst
);
Py_INCREF
(
inst
);
PyTuple_SET_ITEM
(
fr
,
2
,
oname
);
Py_INCREF
(
oname
);
PyTuple_SET_ITEM
(
fr
,
3
,
r
);
Py_INCREF
(
r
);
PyTuple_SET_ITEM
(
fr
,
4
,
extra
);
Py_INCREF
(
extra
);
UNLESS_ASSIGN
(
fr
,
PyObject_CallObject
(
filter
,
fr
))
goto
err
;
ir
=
PyObject_IsTrue
(
fr
);
Py_DECREF
(
fr
);
if
(
ir
)
return
1
;
Py_DECREF
(
r
);
return
0
;
err:
Py_DECREF
(
r
);
return
-
1
;
}
static
int
Wrapper_setattro
(
Wrapper
*
self
,
PyObject
*
name
,
PyObject
*
v
)
{
...
...
@@ -857,7 +857,7 @@ void
initAcquisition
()
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.1
6
$"
;
char
*
rev
=
"$Revision: 1.1
7
$"
;
PURE_MIXIN_CLASS
(
Acquirer
,
"Base class for objects that implicitly"
" acquire attributes from containers
\n
"
...
...
@@ -876,7 +876,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
6 1998/03/23 20:23:35
jim Exp $
\n
"
,
"$Id: Acquisition.c,v 1.1
7 1998/03/24 16:17:01
jim Exp $
\n
"
,
OBJECT
(
NULL
),
PYTHON_API_VERSION
);
d
=
PyModule_GetDict
(
m
);
...
...
@@ -899,6 +899,9 @@ initAcquisition()
/*****************************************************************************
$Log: Acquisition.c,v $
Revision 1.17 1998/03/24 16:17:01 jim
Rearranged.
Revision 1.16 1998/03/23 20:23:35 jim
Added lots of new machinery to handle wrapping of acquired objects.
...
...
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