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 Acquisition Wrappers -- Implementation of acquisition through wrappers
...@@ -296,7 +296,6 @@ Wrapper_acquire(Wrapper *self, PyObject *oname, ...@@ -296,7 +296,6 @@ Wrapper_acquire(Wrapper *self, PyObject *oname,
{ {
PyObject *r; PyObject *r;
char *name; char *name;
int ir;
name=PyString_AsString(oname); name=PyString_AsString(oname);
if(*name++=='a' && *name++=='q' && *name++=='_' if(*name++=='a' && *name++=='q' && *name++=='_'
...@@ -304,7 +303,7 @@ Wrapper_acquire(Wrapper *self, PyObject *oname, ...@@ -304,7 +303,7 @@ Wrapper_acquire(Wrapper *self, PyObject *oname,
if(sob && self->obj) 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) if(r->ob_type==self->ob_type)
{ {
...@@ -593,7 +592,7 @@ Wrapper_length(Wrapper *self) ...@@ -593,7 +592,7 @@ Wrapper_length(Wrapper *self)
answer that we are true, otherwise raise an error. answer that we are true, otherwise raise an error.
*/ */
PyErr_Clear(); 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 */ /* Hm, we have getitem, must be error */
Py_DECREF(r); Py_DECREF(r);
...@@ -859,7 +858,7 @@ void ...@@ -859,7 +858,7 @@ void
initAcquisition() initAcquisition()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.18 $"; char *rev="$Revision: 1.19 $";
PURE_MIXIN_CLASS(Acquirer, PURE_MIXIN_CLASS(Acquirer,
"Base class for objects that implicitly" "Base class for objects that implicitly"
" acquire attributes from containers\n" " acquire attributes from containers\n"
...@@ -878,7 +877,7 @@ initAcquisition() ...@@ -878,7 +877,7 @@ initAcquisition()
/* Create the module and add the functions */ /* Create the module and add the functions */
m = Py_InitModule4("Acquisition", methods, m = Py_InitModule4("Acquisition", methods,
"Provide base classes for acquiring objects\n\n" "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); OBJECT(NULL),PYTHON_API_VERSION);
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
...@@ -901,6 +900,9 @@ initAcquisition() ...@@ -901,6 +900,9 @@ initAcquisition()
/***************************************************************************** /*****************************************************************************
$Log: Acquisition.c,v $ $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 Revision 1.18 1998/03/24 16:21:17 jim
Fixed bad return in wrapper special. 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 Extension Class
...@@ -65,7 +65,7 @@ static char ExtensionClass_module_documentation[] = ...@@ -65,7 +65,7 @@ static char ExtensionClass_module_documentation[] =
" - They provide access to unbound methods,\n" " - They provide access to unbound methods,\n"
" - They can be called to create instances.\n" " - They can be called to create instances.\n"
"\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> #include <stdio.h>
...@@ -877,7 +877,7 @@ PMethod_getattro(PMethod *self, PyObject *oname) ...@@ -877,7 +877,7 @@ PMethod_getattro(PMethod *self, PyObject *oname)
if(self->meth) if(self->meth)
{ {
if(r=PyObject_GetAttr(self->meth, oname)) return r; if((r=PyObject_GetAttr(self->meth, oname))) return r;
PyErr_Clear(); PyErr_Clear();
if(self->self) /* Psuedo attrs */ if(self->self) /* Psuedo attrs */
...@@ -909,7 +909,7 @@ PMethod_setattro(PMethod *self, PyObject *oname, PyObject *v) ...@@ -909,7 +909,7 @@ PMethod_setattro(PMethod *self, PyObject *oname, PyObject *v)
if(self->meth) if(self->meth)
{ {
if(spam=PyObject_GetAttr(self->meth, oname)) if((spam=PyObject_GetAttr(self->meth, oname)))
{ {
Py_DECREF(spam); Py_DECREF(spam);
PyErr_SetString(PyExc_TypeError, PyErr_SetString(PyExc_TypeError,
...@@ -2562,7 +2562,7 @@ subclass_length(PyObject *self) ...@@ -2562,7 +2562,7 @@ subclass_length(PyObject *self)
answer that we are true. answer that we are true.
*/ */
PyErr_Clear(); PyErr_Clear();
if(m=subclass_getspecial(self,py__getitem__)) if((m=subclass_getspecial(self,py__getitem__)))
{ {
/* Hm, we have getitem, must be error */ /* Hm, we have getitem, must be error */
Py_DECREF(m); Py_DECREF(m);
...@@ -3349,7 +3349,7 @@ void ...@@ -3349,7 +3349,7 @@ void
initExtensionClass() initExtensionClass()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.27 $"; char *rev="$Revision: 1.28 $";
PURE_MIXIN_CLASS(Base, "Minimalbase class for Extension Classes", NULL); PURE_MIXIN_CLASS(Base, "Minimalbase class for Extension Classes", NULL);
PMethodType.ob_type=&PyType_Type; PMethodType.ob_type=&PyType_Type;
...@@ -3390,6 +3390,9 @@ initExtensionClass() ...@@ -3390,6 +3390,9 @@ initExtensionClass()
/**************************************************************************** /****************************************************************************
$Log: ExtensionClass.c,v $ $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 Revision 1.27 1998/03/23 20:25:59 jim
Changed the way that methods in pure mix-in classes are constructed. Changed the way that methods in pure mix-in classes are constructed.
Now methods are wrapped in such a way that tricky wrapper objects 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 Acquisition Wrappers -- Implementation of acquisition through wrappers
...@@ -296,7 +296,6 @@ Wrapper_acquire(Wrapper *self, PyObject *oname, ...@@ -296,7 +296,6 @@ Wrapper_acquire(Wrapper *self, PyObject *oname,
{ {
PyObject *r; PyObject *r;
char *name; char *name;
int ir;
name=PyString_AsString(oname); name=PyString_AsString(oname);
if(*name++=='a' && *name++=='q' && *name++=='_' if(*name++=='a' && *name++=='q' && *name++=='_'
...@@ -304,7 +303,7 @@ Wrapper_acquire(Wrapper *self, PyObject *oname, ...@@ -304,7 +303,7 @@ Wrapper_acquire(Wrapper *self, PyObject *oname,
if(sob && self->obj) 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) if(r->ob_type==self->ob_type)
{ {
...@@ -593,7 +592,7 @@ Wrapper_length(Wrapper *self) ...@@ -593,7 +592,7 @@ Wrapper_length(Wrapper *self)
answer that we are true, otherwise raise an error. answer that we are true, otherwise raise an error.
*/ */
PyErr_Clear(); 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 */ /* Hm, we have getitem, must be error */
Py_DECREF(r); Py_DECREF(r);
...@@ -859,7 +858,7 @@ void ...@@ -859,7 +858,7 @@ void
initAcquisition() initAcquisition()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.18 $"; char *rev="$Revision: 1.19 $";
PURE_MIXIN_CLASS(Acquirer, PURE_MIXIN_CLASS(Acquirer,
"Base class for objects that implicitly" "Base class for objects that implicitly"
" acquire attributes from containers\n" " acquire attributes from containers\n"
...@@ -878,7 +877,7 @@ initAcquisition() ...@@ -878,7 +877,7 @@ initAcquisition()
/* Create the module and add the functions */ /* Create the module and add the functions */
m = Py_InitModule4("Acquisition", methods, m = Py_InitModule4("Acquisition", methods,
"Provide base classes for acquiring objects\n\n" "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); OBJECT(NULL),PYTHON_API_VERSION);
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
...@@ -901,6 +900,9 @@ initAcquisition() ...@@ -901,6 +900,9 @@ initAcquisition()
/***************************************************************************** /*****************************************************************************
$Log: Acquisition.c,v $ $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 Revision 1.18 1998/03/24 16:21:17 jim
Fixed bad return in wrapper special. 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 Extension Class
...@@ -65,7 +65,7 @@ static char ExtensionClass_module_documentation[] = ...@@ -65,7 +65,7 @@ static char ExtensionClass_module_documentation[] =
" - They provide access to unbound methods,\n" " - They provide access to unbound methods,\n"
" - They can be called to create instances.\n" " - They can be called to create instances.\n"
"\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> #include <stdio.h>
...@@ -877,7 +877,7 @@ PMethod_getattro(PMethod *self, PyObject *oname) ...@@ -877,7 +877,7 @@ PMethod_getattro(PMethod *self, PyObject *oname)
if(self->meth) if(self->meth)
{ {
if(r=PyObject_GetAttr(self->meth, oname)) return r; if((r=PyObject_GetAttr(self->meth, oname))) return r;
PyErr_Clear(); PyErr_Clear();
if(self->self) /* Psuedo attrs */ if(self->self) /* Psuedo attrs */
...@@ -909,7 +909,7 @@ PMethod_setattro(PMethod *self, PyObject *oname, PyObject *v) ...@@ -909,7 +909,7 @@ PMethod_setattro(PMethod *self, PyObject *oname, PyObject *v)
if(self->meth) if(self->meth)
{ {
if(spam=PyObject_GetAttr(self->meth, oname)) if((spam=PyObject_GetAttr(self->meth, oname)))
{ {
Py_DECREF(spam); Py_DECREF(spam);
PyErr_SetString(PyExc_TypeError, PyErr_SetString(PyExc_TypeError,
...@@ -2562,7 +2562,7 @@ subclass_length(PyObject *self) ...@@ -2562,7 +2562,7 @@ subclass_length(PyObject *self)
answer that we are true. answer that we are true.
*/ */
PyErr_Clear(); PyErr_Clear();
if(m=subclass_getspecial(self,py__getitem__)) if((m=subclass_getspecial(self,py__getitem__)))
{ {
/* Hm, we have getitem, must be error */ /* Hm, we have getitem, must be error */
Py_DECREF(m); Py_DECREF(m);
...@@ -3349,7 +3349,7 @@ void ...@@ -3349,7 +3349,7 @@ void
initExtensionClass() initExtensionClass()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.27 $"; char *rev="$Revision: 1.28 $";
PURE_MIXIN_CLASS(Base, "Minimalbase class for Extension Classes", NULL); PURE_MIXIN_CLASS(Base, "Minimalbase class for Extension Classes", NULL);
PMethodType.ob_type=&PyType_Type; PMethodType.ob_type=&PyType_Type;
...@@ -3390,6 +3390,9 @@ initExtensionClass() ...@@ -3390,6 +3390,9 @@ initExtensionClass()
/**************************************************************************** /****************************************************************************
$Log: ExtensionClass.c,v $ $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 Revision 1.27 1998/03/23 20:25:59 jim
Changed the way that methods in pure mix-in classes are constructed. Changed the way that methods in pure mix-in classes are constructed.
Now methods are wrapped in such a way that tricky wrapper objects 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