[Zope3-checkins]
SVN: Zope3/branches/philikon-messages-as-rocks/src/zope/i18nmessageid/_zope_i18nmessageid_message.c
The || operator in C does not return either one of its
operands. It only
Philipp von Weitershausen
philikon at philikon.de
Mon Sep 20 07:24:38 EDT 2004
Log message for revision 27642:
The || operator in C does not return either one of its operands. It only
returns 0 or 1; therefore, use the tertiary operator instead.
Changed:
U Zope3/branches/philikon-messages-as-rocks/src/zope/i18nmessageid/_zope_i18nmessageid_message.c
-=-
Modified: Zope3/branches/philikon-messages-as-rocks/src/zope/i18nmessageid/_zope_i18nmessageid_message.c
===================================================================
--- Zope3/branches/philikon-messages-as-rocks/src/zope/i18nmessageid/_zope_i18nmessageid_message.c 2004-09-19 17:10:20 UTC (rev 27641)
+++ Zope3/branches/philikon-messages-as-rocks/src/zope/i18nmessageid/_zope_i18nmessageid_message.c 2004-09-20 11:24:38 UTC (rev 27642)
@@ -152,11 +152,11 @@
value = PyObject_CallFunctionObjArgs((PyObject *)&PyUnicode_Type, self, NULL);
if (value == NULL)
return NULL;
- result = Py_BuildValue("O(OOOO)", self->base.ob_type,
+ result = Py_BuildValue("(O(OOOO))", self->base.ob_type,
value,
- self->domain || Py_None,
- self->default_ || Py_None,
- self->mapping || Py_None);
+ self->domain ? self->domain : Py_None,
+ self->default_ ? self->default_ : Py_None,
+ self->mapping ? self->mapping : Py_None);
Py_DECREF(value);
return result;
}
More information about the Zope3-Checkins
mailing list