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
95c1388e
Commit
95c1388e
authored
Jan 16, 2001
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make acquisition non-pickleable, to prevent accidental pickling.
parent
a68fd60c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
+18
-6
lib/Components/ExtensionClass/Acquisition.c
lib/Components/ExtensionClass/Acquisition.c
+9
-3
lib/Components/ExtensionClass/src/Acquisition.c
lib/Components/ExtensionClass/src/Acquisition.c
+9
-3
No files found.
lib/Components/ExtensionClass/Acquisition.c
View file @
95c1388e
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
DAMAGE.
$Id: Acquisition.c,v 1.4
5 2000/10/05 23:25:01 shane
Exp $
$Id: Acquisition.c,v 1.4
6 2001/01/16 15:39:41 jim
Exp $
If you have questions regarding this software,
If you have questions regarding this software,
contact:
contact:
...
@@ -409,6 +409,12 @@ Wrapper_findattr(Wrapper *self, PyObject *oname,
...
@@ -409,6 +409,12 @@ Wrapper_findattr(Wrapper *self, PyObject *oname,
else
return
r
;
else
return
r
;
}
}
else
PyErr_Clear
();
else
PyErr_Clear
();
else
if
(
*
name
==
'_'
&&
name
[
1
]
==
'_'
&&
strcmp
(
name
+
2
,
"reduce__"
)
==
0
)
{
PyErr_SetString
(
PyExc_TypeError
,
"Can't pickle objects in acquisition wrappers."
);
return
NULL
;
}
/* If we are doing a containment search, then replace self with aq_inner */
/* If we are doing a containment search, then replace self with aq_inner */
if
(
containment
)
if
(
containment
)
...
@@ -1419,7 +1425,7 @@ void
...
@@ -1419,7 +1425,7 @@ void
initAcquisition
()
initAcquisition
()
{
{
PyObject
*
m
,
*
d
;
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.4
5
$"
;
char
*
rev
=
"$Revision: 1.4
6
$"
;
PURE_MIXIN_CLASS
(
Acquirer
,
PURE_MIXIN_CLASS
(
Acquirer
,
"Base class for objects that implicitly"
"Base class for objects that implicitly"
" acquire attributes from containers
\n
"
" acquire attributes from containers
\n
"
...
@@ -1438,7 +1444,7 @@ initAcquisition()
...
@@ -1438,7 +1444,7 @@ initAcquisition()
/* Create the module and add the functions */
/* Create the module and add the functions */
m
=
Py_InitModule4
(
"Acquisition"
,
methods
,
m
=
Py_InitModule4
(
"Acquisition"
,
methods
,
"Provide base classes for acquiring objects
\n\n
"
"Provide base classes for acquiring objects
\n\n
"
"$Id: Acquisition.c,v 1.4
5 2000/10/05 23:25:01 shane
Exp $
\n
"
,
"$Id: Acquisition.c,v 1.4
6 2001/01/16 15:39:41 jim
Exp $
\n
"
,
OBJECT
(
NULL
),
PYTHON_API_VERSION
);
OBJECT
(
NULL
),
PYTHON_API_VERSION
);
d
=
PyModule_GetDict
(
m
);
d
=
PyModule_GetDict
(
m
);
...
...
lib/Components/ExtensionClass/src/Acquisition.c
View file @
95c1388e
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
DAMAGE.
$Id: Acquisition.c,v 1.4
5 2000/10/05 23:25:01 shane
Exp $
$Id: Acquisition.c,v 1.4
6 2001/01/16 15:39:41 jim
Exp $
If you have questions regarding this software,
If you have questions regarding this software,
contact:
contact:
...
@@ -409,6 +409,12 @@ Wrapper_findattr(Wrapper *self, PyObject *oname,
...
@@ -409,6 +409,12 @@ Wrapper_findattr(Wrapper *self, PyObject *oname,
else
return
r
;
else
return
r
;
}
}
else
PyErr_Clear
();
else
PyErr_Clear
();
else
if
(
*
name
==
'_'
&&
name
[
1
]
==
'_'
&&
strcmp
(
name
+
2
,
"reduce__"
)
==
0
)
{
PyErr_SetString
(
PyExc_TypeError
,
"Can't pickle objects in acquisition wrappers."
);
return
NULL
;
}
/* If we are doing a containment search, then replace self with aq_inner */
/* If we are doing a containment search, then replace self with aq_inner */
if
(
containment
)
if
(
containment
)
...
@@ -1419,7 +1425,7 @@ void
...
@@ -1419,7 +1425,7 @@ void
initAcquisition
()
initAcquisition
()
{
{
PyObject
*
m
,
*
d
;
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.4
5
$"
;
char
*
rev
=
"$Revision: 1.4
6
$"
;
PURE_MIXIN_CLASS
(
Acquirer
,
PURE_MIXIN_CLASS
(
Acquirer
,
"Base class for objects that implicitly"
"Base class for objects that implicitly"
" acquire attributes from containers
\n
"
" acquire attributes from containers
\n
"
...
@@ -1438,7 +1444,7 @@ initAcquisition()
...
@@ -1438,7 +1444,7 @@ initAcquisition()
/* Create the module and add the functions */
/* Create the module and add the functions */
m
=
Py_InitModule4
(
"Acquisition"
,
methods
,
m
=
Py_InitModule4
(
"Acquisition"
,
methods
,
"Provide base classes for acquiring objects
\n\n
"
"Provide base classes for acquiring objects
\n\n
"
"$Id: Acquisition.c,v 1.4
5 2000/10/05 23:25:01 shane
Exp $
\n
"
,
"$Id: Acquisition.c,v 1.4
6 2001/01/16 15:39:41 jim
Exp $
\n
"
,
OBJECT
(
NULL
),
PYTHON_API_VERSION
);
OBJECT
(
NULL
),
PYTHON_API_VERSION
);
d
=
PyModule_GetDict
(
m
);
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