[Bf-committers] Klocwork source analysis
Joe Eagar
joeedh at gmail.com
Sun Dec 3 01:01:40 CET 2006
Stephen Swaney wrote:
> On Fri, Dec 01, 2006 at 09:01:21PM -0700, Joe Eagar wrote:
>
>
>> Hi. I looked at the ID property stuff in the report, and the report
>> seems completely useless on it. It makes no sense, the line numbers
>> don't match, and frankly I have no clue what's going on there :S
>>
>
> The report was done before you made some changes so the line
> numbers don't match.
>
> In BPy_IDProperty_getattr(), you are not checking the pointer
> returned from PyObject_New() before using it. It can be NULL.
>
Well I don't see the point of doing a NULL check there; it seems as
pointless as checking for NULL after alloc functions.
As for the Py_XINCREF, the ref count is being incremented because the
wrapped object is stored in ->data_wrap. Seems fine to me, though I'm
not an expert of refcounting. :S
Joe
More information about the Bf-committers
mailing list