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
d92dfc23
Commit
d92dfc23
authored
Jan 02, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in instance getattr so that instances don't get __bases__
from their class.
parent
6662981a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
6 deletions
+30
-6
lib/Components/ExtensionClass/ExtensionClass.c
lib/Components/ExtensionClass/ExtensionClass.c
+15
-3
lib/Components/ExtensionClass/src/ExtensionClass.c
lib/Components/ExtensionClass/src/ExtensionClass.c
+15
-3
No files found.
lib/Components/ExtensionClass/ExtensionClass.c
View file @
d92dfc23
/*
$Id: ExtensionClass.c,v 1.2
1 1997/12/23 13:39:16
jim Exp $
$Id: ExtensionClass.c,v 1.2
2 1998/01/02 18:18:28
jim Exp $
Extension Class
...
...
@@ -65,7 +65,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.2
1 1997/12/23 13:39:16
jim Exp $
\n
"
"$Id: ExtensionClass.c,v 1.2
2 1998/01/02 18:18:28
jim Exp $
\n
"
;
#include <stdio.h>
...
...
@@ -1565,7 +1565,15 @@ ExtensionClass_FindInstanceAttribute(PyObject *inst, PyObject *oname,
}
UNLESS
(
r
)
{
if
(
*
name
==
'_'
&&
name
[
1
]
==
'_'
&&
name
[
2
]
==
'b'
&&
strcmp
(
name
+
2
,
"bases__"
)
==
0
)
{
PyErr_SetObject
(
PyExc_AttributeError
,
oname
);
return
NULL
;
}
PyErr_Clear
();
UNLESS
(
r
=
CCL_getattr
(
self
,
oname
,
0
))
return
NULL
;
/* We got something from our class, maybe its an unbound method. */
...
...
@@ -3277,7 +3285,7 @@ void
initExtensionClass
()
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.2
1
$"
;
char
*
rev
=
"$Revision: 1.2
2
$"
;
PURE_MIXIN_CLASS
(
Base
,
"Minimalbase class for Extension Classes"
,
NULL
);
PMethodType
.
ob_type
=&
PyType_Type
;
...
...
@@ -3318,6 +3326,10 @@ initExtensionClass()
/****************************************************************************
$Log: ExtensionClass.c,v $
Revision 1.22 1998/01/02 18:18:28 jim
Fixed bug in instance getattr so that instances don't get __bases__
from their class.
Revision 1.21 1997/12/23 13:39:16 jim
Fixed bug in method setattr.
Added checks for method attributes in get/setattr on user-defined
...
...
lib/Components/ExtensionClass/src/ExtensionClass.c
View file @
d92dfc23
/*
$Id: ExtensionClass.c,v 1.2
1 1997/12/23 13:39:16
jim Exp $
$Id: ExtensionClass.c,v 1.2
2 1998/01/02 18:18:28
jim Exp $
Extension Class
...
...
@@ -65,7 +65,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.2
1 1997/12/23 13:39:16
jim Exp $
\n
"
"$Id: ExtensionClass.c,v 1.2
2 1998/01/02 18:18:28
jim Exp $
\n
"
;
#include <stdio.h>
...
...
@@ -1565,7 +1565,15 @@ ExtensionClass_FindInstanceAttribute(PyObject *inst, PyObject *oname,
}
UNLESS
(
r
)
{
if
(
*
name
==
'_'
&&
name
[
1
]
==
'_'
&&
name
[
2
]
==
'b'
&&
strcmp
(
name
+
2
,
"bases__"
)
==
0
)
{
PyErr_SetObject
(
PyExc_AttributeError
,
oname
);
return
NULL
;
}
PyErr_Clear
();
UNLESS
(
r
=
CCL_getattr
(
self
,
oname
,
0
))
return
NULL
;
/* We got something from our class, maybe its an unbound method. */
...
...
@@ -3277,7 +3285,7 @@ void
initExtensionClass
()
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.2
1
$"
;
char
*
rev
=
"$Revision: 1.2
2
$"
;
PURE_MIXIN_CLASS
(
Base
,
"Minimalbase class for Extension Classes"
,
NULL
);
PMethodType
.
ob_type
=&
PyType_Type
;
...
...
@@ -3318,6 +3326,10 @@ initExtensionClass()
/****************************************************************************
$Log: ExtensionClass.c,v $
Revision 1.22 1998/01/02 18:18:28 jim
Fixed bug in instance getattr so that instances don't get __bases__
from their class.
Revision 1.21 1997/12/23 13:39:16 jim
Fixed bug in method setattr.
Added checks for method attributes in get/setattr on user-defined
...
...
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