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
350c7790
Commit
350c7790
authored
Mar 24, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added parens to make gcc SHUT UP!
parent
051e65e4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
24 deletions
+34
-24
lib/Components/ExtensionClass/Acquisition.c
lib/Components/ExtensionClass/Acquisition.c
+8
-6
lib/Components/ExtensionClass/ExtensionClass.c
lib/Components/ExtensionClass/ExtensionClass.c
+9
-6
lib/Components/ExtensionClass/src/Acquisition.c
lib/Components/ExtensionClass/src/Acquisition.c
+8
-6
lib/Components/ExtensionClass/src/ExtensionClass.c
lib/Components/ExtensionClass/src/ExtensionClass.c
+9
-6
No files found.
lib/Components/ExtensionClass/Acquisition.c
View file @
350c7790
/*
$Id: Acquisition.c,v 1.1
8 1998/03/24 16:21:17
jim Exp $
$Id: Acquisition.c,v 1.1
9 1998/03/24 16:23:19
jim Exp $
Acquisition Wrappers -- Implementation of acquisition through wrappers
...
...
@@ -296,7 +296,6 @@ Wrapper_acquire(Wrapper *self, PyObject *oname,
{
PyObject
*
r
;
char
*
name
;
int
ir
;
name
=
PyString_AsString
(
oname
);
if
(
*
name
++==
'a'
&&
*
name
++==
'q'
&&
*
name
++==
'_'
...
...
@@ -304,7 +303,7 @@ Wrapper_acquire(Wrapper *self, PyObject *oname,
if
(
sob
&&
self
->
obj
)
{
if
(
r
=
PyObject_GetAttr
(
self
->
obj
,
oname
))
if
(
(
r
=
PyObject_GetAttr
(
self
->
obj
,
oname
)
))
{
if
(
r
->
ob_type
==
self
->
ob_type
)
{
...
...
@@ -593,7 +592,7 @@ Wrapper_length(Wrapper *self)
answer that we are true, otherwise raise an error.
*/
PyErr_Clear
();
if
(
r
=
PyObject_GetAttr
(
OBJECT
(
self
),
py__getitem__
))
if
(
(
r
=
PyObject_GetAttr
(
OBJECT
(
self
),
py__getitem__
)
))
{
/* Hm, we have getitem, must be error */
Py_DECREF
(
r
);
...
...
@@ -859,7 +858,7 @@ void
initAcquisition
()
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.1
8
$"
;
char
*
rev
=
"$Revision: 1.1
9
$"
;
PURE_MIXIN_CLASS
(
Acquirer
,
"Base class for objects that implicitly"
" acquire attributes from containers
\n
"
...
...
@@ -878,7 +877,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
8 1998/03/24 16:21:17
jim Exp $
\n
"
,
"$Id: Acquisition.c,v 1.1
9 1998/03/24 16:23:19
jim Exp $
\n
"
,
OBJECT
(
NULL
),
PYTHON_API_VERSION
);
d
=
PyModule_GetDict
(
m
);
...
...
@@ -901,6 +900,9 @@ initAcquisition()
/*****************************************************************************
$Log: Acquisition.c,v $
Revision 1.19 1998/03/24 16:23:19 jim
Added parens to make gcc SHUT UP!
Revision 1.18 1998/03/24 16:21:17 jim
Fixed bad return in wrapper special.
...
...
lib/Components/ExtensionClass/ExtensionClass.c
View file @
350c7790
/*
$Id: ExtensionClass.c,v 1.2
7 1998/03/23 20:25:59
jim Exp $
$Id: ExtensionClass.c,v 1.2
8 1998/03/24 16:18:54
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
7 1998/03/23 20:25:59
jim Exp $
\n
"
"$Id: ExtensionClass.c,v 1.2
8 1998/03/24 16:18:54
jim Exp $
\n
"
;
#include <stdio.h>
...
...
@@ -877,7 +877,7 @@ PMethod_getattro(PMethod *self, PyObject *oname)
if
(
self
->
meth
)
{
if
(
r
=
PyObject_GetAttr
(
self
->
meth
,
oname
))
return
r
;
if
(
(
r
=
PyObject_GetAttr
(
self
->
meth
,
oname
)
))
return
r
;
PyErr_Clear
();
if
(
self
->
self
)
/* Psuedo attrs */
...
...
@@ -909,7 +909,7 @@ PMethod_setattro(PMethod *self, PyObject *oname, PyObject *v)
if
(
self
->
meth
)
{
if
(
spam
=
PyObject_GetAttr
(
self
->
meth
,
oname
))
if
(
(
spam
=
PyObject_GetAttr
(
self
->
meth
,
oname
)
))
{
Py_DECREF
(
spam
);
PyErr_SetString
(
PyExc_TypeError
,
...
...
@@ -2562,7 +2562,7 @@ subclass_length(PyObject *self)
answer that we are true.
*/
PyErr_Clear
();
if
(
m
=
subclass_getspecial
(
self
,
py__getitem__
))
if
(
(
m
=
subclass_getspecial
(
self
,
py__getitem__
)
))
{
/* Hm, we have getitem, must be error */
Py_DECREF
(
m
);
...
...
@@ -3349,7 +3349,7 @@ void
initExtensionClass
()
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.2
7
$"
;
char
*
rev
=
"$Revision: 1.2
8
$"
;
PURE_MIXIN_CLASS
(
Base
,
"Minimalbase class for Extension Classes"
,
NULL
);
PMethodType
.
ob_type
=&
PyType_Type
;
...
...
@@ -3390,6 +3390,9 @@ initExtensionClass()
/****************************************************************************
$Log: ExtensionClass.c,v $
Revision 1.28 1998/03/24 16:18:54 jim
Added parens to make gcc SHUT UP!
Revision 1.27 1998/03/23 20:25:59 jim
Changed the way that methods in pure mix-in classes are constructed.
Now methods are wrapped in such a way that tricky wrapper objects
...
...
lib/Components/ExtensionClass/src/Acquisition.c
View file @
350c7790
/*
$Id: Acquisition.c,v 1.1
8 1998/03/24 16:21:17
jim Exp $
$Id: Acquisition.c,v 1.1
9 1998/03/24 16:23:19
jim Exp $
Acquisition Wrappers -- Implementation of acquisition through wrappers
...
...
@@ -296,7 +296,6 @@ Wrapper_acquire(Wrapper *self, PyObject *oname,
{
PyObject
*
r
;
char
*
name
;
int
ir
;
name
=
PyString_AsString
(
oname
);
if
(
*
name
++==
'a'
&&
*
name
++==
'q'
&&
*
name
++==
'_'
...
...
@@ -304,7 +303,7 @@ Wrapper_acquire(Wrapper *self, PyObject *oname,
if
(
sob
&&
self
->
obj
)
{
if
(
r
=
PyObject_GetAttr
(
self
->
obj
,
oname
))
if
(
(
r
=
PyObject_GetAttr
(
self
->
obj
,
oname
)
))
{
if
(
r
->
ob_type
==
self
->
ob_type
)
{
...
...
@@ -593,7 +592,7 @@ Wrapper_length(Wrapper *self)
answer that we are true, otherwise raise an error.
*/
PyErr_Clear
();
if
(
r
=
PyObject_GetAttr
(
OBJECT
(
self
),
py__getitem__
))
if
(
(
r
=
PyObject_GetAttr
(
OBJECT
(
self
),
py__getitem__
)
))
{
/* Hm, we have getitem, must be error */
Py_DECREF
(
r
);
...
...
@@ -859,7 +858,7 @@ void
initAcquisition
()
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.1
8
$"
;
char
*
rev
=
"$Revision: 1.1
9
$"
;
PURE_MIXIN_CLASS
(
Acquirer
,
"Base class for objects that implicitly"
" acquire attributes from containers
\n
"
...
...
@@ -878,7 +877,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
8 1998/03/24 16:21:17
jim Exp $
\n
"
,
"$Id: Acquisition.c,v 1.1
9 1998/03/24 16:23:19
jim Exp $
\n
"
,
OBJECT
(
NULL
),
PYTHON_API_VERSION
);
d
=
PyModule_GetDict
(
m
);
...
...
@@ -901,6 +900,9 @@ initAcquisition()
/*****************************************************************************
$Log: Acquisition.c,v $
Revision 1.19 1998/03/24 16:23:19 jim
Added parens to make gcc SHUT UP!
Revision 1.18 1998/03/24 16:21:17 jim
Fixed bad return in wrapper special.
...
...
lib/Components/ExtensionClass/src/ExtensionClass.c
View file @
350c7790
/*
$Id: ExtensionClass.c,v 1.2
7 1998/03/23 20:25:59
jim Exp $
$Id: ExtensionClass.c,v 1.2
8 1998/03/24 16:18:54
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
7 1998/03/23 20:25:59
jim Exp $
\n
"
"$Id: ExtensionClass.c,v 1.2
8 1998/03/24 16:18:54
jim Exp $
\n
"
;
#include <stdio.h>
...
...
@@ -877,7 +877,7 @@ PMethod_getattro(PMethod *self, PyObject *oname)
if
(
self
->
meth
)
{
if
(
r
=
PyObject_GetAttr
(
self
->
meth
,
oname
))
return
r
;
if
(
(
r
=
PyObject_GetAttr
(
self
->
meth
,
oname
)
))
return
r
;
PyErr_Clear
();
if
(
self
->
self
)
/* Psuedo attrs */
...
...
@@ -909,7 +909,7 @@ PMethod_setattro(PMethod *self, PyObject *oname, PyObject *v)
if
(
self
->
meth
)
{
if
(
spam
=
PyObject_GetAttr
(
self
->
meth
,
oname
))
if
(
(
spam
=
PyObject_GetAttr
(
self
->
meth
,
oname
)
))
{
Py_DECREF
(
spam
);
PyErr_SetString
(
PyExc_TypeError
,
...
...
@@ -2562,7 +2562,7 @@ subclass_length(PyObject *self)
answer that we are true.
*/
PyErr_Clear
();
if
(
m
=
subclass_getspecial
(
self
,
py__getitem__
))
if
(
(
m
=
subclass_getspecial
(
self
,
py__getitem__
)
))
{
/* Hm, we have getitem, must be error */
Py_DECREF
(
m
);
...
...
@@ -3349,7 +3349,7 @@ void
initExtensionClass
()
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.2
7
$"
;
char
*
rev
=
"$Revision: 1.2
8
$"
;
PURE_MIXIN_CLASS
(
Base
,
"Minimalbase class for Extension Classes"
,
NULL
);
PMethodType
.
ob_type
=&
PyType_Type
;
...
...
@@ -3390,6 +3390,9 @@ initExtensionClass()
/****************************************************************************
$Log: ExtensionClass.c,v $
Revision 1.28 1998/03/24 16:18:54 jim
Added parens to make gcc SHUT UP!
Revision 1.27 1998/03/23 20:25:59 jim
Changed the way that methods in pure mix-in classes are constructed.
Now methods are wrapped in such a way that tricky wrapper 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