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
5f2ac005
Commit
5f2ac005
authored
Feb 15, 2005
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed code that assumed that there weren't subclasses of the
ExtensionClass meta class.
parent
56f1205e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
lib/python/ExtensionClass/ExtensionClass.h
lib/python/ExtensionClass/ExtensionClass.h
+3
-3
lib/python/ExtensionClass/_ExtensionClass.c
lib/python/ExtensionClass/_ExtensionClass.c
+1
-1
No files found.
lib/python/ExtensionClass/ExtensionClass.h
View file @
5f2ac005
...
...
@@ -175,11 +175,11 @@ static struct ExtensionClassCAPIstruct {
/* The following macro checks whether a type is an extension class: */
#define PyExtensionClass_Check(TYPE) \
(((PyObject*)(TYPE))->ob_type ==
ECExtensionClassType)
PyObject_TypeCheck((PyObject*)(TYPE),
ECExtensionClassType)
/* The following macro checks whether an instance is an extension instance: */
#define PyExtensionInstance_Check(INST) \
(((PyObject*)(INST))->ob_type->ob_type ==
ECExtensionClassType)
PyObject_TypeCheck(((PyObject*)(INST))->ob_type,
ECExtensionClassType)
#define CHECK_FOR_ERRORS(MESS)
...
...
@@ -213,7 +213,7 @@ static PyExtensionClass NAME ## Type = { PyObject_HEAD_INIT(NULL) 0, # NAME, \
/* Check whether an object has an __of__ method for returning itself
in the context of it's container. */
#define has__of__(O) (
(O)->ob_type->ob_type == ECExtensionClassType
\
#define has__of__(O) (
PyObject_TypeCheck((O)->ob_type, ECExtensionClassType)
\
&& (O)->ob_type->tp_descr_get != NULL)
/* The following macros are used to check whether an instance
...
...
lib/python/ExtensionClass/_ExtensionClass.c
View file @
5f2ac005
...
...
@@ -143,7 +143,7 @@ Base_getattro(PyObject *obj, PyObject *name)
then call it. */
if
(
PyObject_TypeCheck
(
res
->
ob_type
,
&
ExtensionClassType
)
&
ExtensionClassType
)
&&
res
->
ob_type
->
tp_descr_get
!=
NULL
)
res
=
res
->
ob_type
->
tp_descr_get
(
res
,
obj
,
...
...
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