Commit 350c7790 authored by Jim Fulton's avatar Jim Fulton

Added parens to make gcc SHUT UP!

parent 051e65e4
/*
$Id: Acquisition.c,v 1.18 1998/03/24 16:21:17 jim Exp $
$Id: Acquisition.c,v 1.19 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.18 $";
char *rev="$Revision: 1.19 $";
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.18 1998/03/24 16:21:17 jim Exp $\n",
"$Id: Acquisition.c,v 1.19 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.
......
/*
$Id: ExtensionClass.c,v 1.27 1998/03/23 20:25:59 jim Exp $
$Id: ExtensionClass.c,v 1.28 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.27 1998/03/23 20:25:59 jim Exp $\n"
"$Id: ExtensionClass.c,v 1.28 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.27 $";
char *rev="$Revision: 1.28 $";
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
......
/*
$Id: Acquisition.c,v 1.18 1998/03/24 16:21:17 jim Exp $
$Id: Acquisition.c,v 1.19 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.18 $";
char *rev="$Revision: 1.19 $";
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.18 1998/03/24 16:21:17 jim Exp $\n",
"$Id: Acquisition.c,v 1.19 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.
......
/*
$Id: ExtensionClass.c,v 1.27 1998/03/23 20:25:59 jim Exp $
$Id: ExtensionClass.c,v 1.28 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.27 1998/03/23 20:25:59 jim Exp $\n"
"$Id: ExtensionClass.c,v 1.28 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.27 $";
char *rev="$Revision: 1.28 $";
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment