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
8410e0ee
Commit
8410e0ee
authored
Jan 10, 2001
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug: instances without their own dictionaries could
accidentally inherit one from a base class.
parent
366e8e44
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
10 deletions
+18
-10
lib/Components/ExtensionClass/ExtensionClass.c
lib/Components/ExtensionClass/ExtensionClass.c
+9
-5
lib/Components/ExtensionClass/src/ExtensionClass.c
lib/Components/ExtensionClass/src/ExtensionClass.c
+9
-5
No files found.
lib/Components/ExtensionClass/ExtensionClass.c
View file @
8410e0ee
...
...
@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
$Id: ExtensionClass.c,v 1.4
1 2000/12/26 15:20:23
jim Exp $
$Id: ExtensionClass.c,v 1.4
2 2001/01/10 18:49:16
jim Exp $
If you have questions regarding this software,
contact:
...
...
@@ -54,7 +54,7 @@ static char ExtensionClass_module_documentation[] =
" - They provide access to unbound methods,
\n
"
" - They can be called to create instances.
\n
"
"
\n
"
"$Id: ExtensionClass.c,v 1.4
1 2000/12/26 15:20:23
jim Exp $
\n
"
"$Id: ExtensionClass.c,v 1.4
2 2001/01/10 18:49:16
jim Exp $
\n
"
;
#include <stdio.h>
...
...
@@ -1708,8 +1708,12 @@ ExtensionClass_FindInstanceAttribute(PyObject *inst, PyObject *oname,
}
UNLESS
(
r
)
{
if
(
*
name
==
'_'
&&
name
[
1
]
==
'_'
&&
name
[
2
]
==
'b'
&&
strcmp
(
name
+
2
,
"bases__"
)
==
0
)
if
(
*
name
==
'_'
&&
name
[
1
]
==
'_'
&&
(
(
name
[
2
]
==
'b'
&&
strcmp
(
name
+
2
,
"bases__"
)
==
0
)
||
(
name
[
2
]
==
'd'
&&
strcmp
(
name
+
2
,
"dict__"
)
==
0
)
)
)
{
PyErr_SetObject
(
PyExc_AttributeError
,
oname
);
return
NULL
;
...
...
@@ -3523,7 +3527,7 @@ void
initExtensionClass
()
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.4
1
$"
;
char
*
rev
=
"$Revision: 1.4
2
$"
;
PURE_MIXIN_CLASS
(
Base
,
"Minimalbase class for Extension Classes"
,
NULL
);
PMethodType
.
ob_type
=&
PyType_Type
;
...
...
lib/Components/ExtensionClass/src/ExtensionClass.c
View file @
8410e0ee
...
...
@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
$Id: ExtensionClass.c,v 1.4
1 2000/12/26 15:20:23
jim Exp $
$Id: ExtensionClass.c,v 1.4
2 2001/01/10 18:49:16
jim Exp $
If you have questions regarding this software,
contact:
...
...
@@ -54,7 +54,7 @@ static char ExtensionClass_module_documentation[] =
" - They provide access to unbound methods,
\n
"
" - They can be called to create instances.
\n
"
"
\n
"
"$Id: ExtensionClass.c,v 1.4
1 2000/12/26 15:20:23
jim Exp $
\n
"
"$Id: ExtensionClass.c,v 1.4
2 2001/01/10 18:49:16
jim Exp $
\n
"
;
#include <stdio.h>
...
...
@@ -1708,8 +1708,12 @@ ExtensionClass_FindInstanceAttribute(PyObject *inst, PyObject *oname,
}
UNLESS
(
r
)
{
if
(
*
name
==
'_'
&&
name
[
1
]
==
'_'
&&
name
[
2
]
==
'b'
&&
strcmp
(
name
+
2
,
"bases__"
)
==
0
)
if
(
*
name
==
'_'
&&
name
[
1
]
==
'_'
&&
(
(
name
[
2
]
==
'b'
&&
strcmp
(
name
+
2
,
"bases__"
)
==
0
)
||
(
name
[
2
]
==
'd'
&&
strcmp
(
name
+
2
,
"dict__"
)
==
0
)
)
)
{
PyErr_SetObject
(
PyExc_AttributeError
,
oname
);
return
NULL
;
...
...
@@ -3523,7 +3527,7 @@ void
initExtensionClass
()
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.4
1
$"
;
char
*
rev
=
"$Revision: 1.4
2
$"
;
PURE_MIXIN_CLASS
(
Base
,
"Minimalbase class for Extension Classes"
,
NULL
);
PMethodType
.
ob_type
=&
PyType_Type
;
...
...
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