[MERGE][1.0] update C PatienceDiff to allow for non-strings
Lukáš Lalinský
lalinsky at gmail.com
Tue Dec 4 16:57:04 GMT 2007
On Ut, 2007-12-04 at 10:31 -0600, John Arbash Meinel wrote:
> + subitem = PySequence_Fast_GET_ITEM(item, j);
> + cur_len = PyObject_Length(subitem);
> + if (cur_len == -1) {
> + /* Error */
> + return -1;
Not very important case, since this is probably not going to happen in
any real code, but you are leaking a copy of the list of lines here.
> + /* Generic length */
> + cur_len = PyObject_Length(item);
> + if (cur_len == -1) {
> + /* Error */
> + return -1;
Same here.
> + line->data = item;
> + line->hash = PyObject_Hash(item);
> + if (line->hash == (-1)) {
> + /* Propogate the hash exception */
> return -1;
And here.
Lukas
More information about the bazaar
mailing list