Modified version of a patch from ahihi on the discuss list, releasing the string we get containing the raw image data. maintenance-1.2
authorPeter Hosey <hg@boredzo.org>
Sat May 14 11:19:53 2011 -0700 (2011-05-14)
branchmaintenance-1.2
changeset 4700a1f37df70d04
parent 4699 02c5148373be
child 4701 668c209b7cfc
child 4702 f8a2d15cc8f4
Modified version of a patch from ahihi on the discuss list, releasing the string we get containing the raw image data.

The Python internal library does not follow Core Foundation naming rules. PyObject_GetAttrString returns an ownership, which we must release. <http://docs.python.org/release/2.6/c-api/object.html>
Bindings/python/libgrowl.c
     1.1 --- a/Bindings/python/libgrowl.c	Sat May 14 10:26:21 2011 -0700
     1.2 +++ b/Bindings/python/libgrowl.c	Sat May 14 11:19:53 2011 -0700
     1.3 @@ -115,9 +115,11 @@
     1.4  				CFDataRef convertedValue = CFDataCreate(kCFAllocatorDefault,
     1.5  														(const UInt8 *)PyString_AsString(lValue),
     1.6  														PyString_Size(lValue));
     1.7 +				Py_DECREF(lValue);
     1.8  				CFDictionarySetValue(note, convertedKey, convertedValue);
     1.9  				CFRelease(convertedValue);
    1.10  			} else {
    1.11 +				Py_DECREF(lValue);
    1.12  				CFRelease(convertedKey);
    1.13  				PyErr_SetString(PyExc_TypeError, "Icon with rawImageData attribute present must ensure it is a string.");
    1.14  				goto error;