[Zope3-dev] Codecheck please
Jim Fulton
jim at zope.com
Tue Mar 15 15:24:42 EST 2005
Jim Fulton wrote:
> Garrett Smith wrote:
>
>> Would someone check this Python -> C translation:
>>
>>
>>> +/* if type(value) is Proxy: */
>>> +/* return value */
>>
>>
>>
>>> + if ((PyObject*)(value->ob_type) == Proxy)
>>> + {
>>> + Py_INCREF(value);
>>> + return value;
>>> + }
>
>
> Looks good. You probably don't need the cast.
Of course, whether the INCRED is correct depends on code you didn't
show.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-dev
mailing list