[MERGE][1.0] update C PatienceDiff to allow for non-strings
Andrew Bennetts
andrew at canonical.com
Wed Dec 19 23:19:45 GMT 2007
John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Lukáš Lalinský wrote:
> > On St, 2007-12-05 at 09:28 -0600, John Arbash Meinel wrote:
> >> - const char *data;
> >> + const PyObject *data;
> >
> > I think this should be just PyObject *, to avoid the const -> non-const
> > type casting below.
>
> 'const' seems more correct, from a "the data should be treated as const"
> standpoint. It is just that "PyObject_Compare" should take const pointers.
> Though could there be side-effects from Compare?
Yes, there could be side-effects from PyObject_Compare: a class might implement
a __cmp__ that mutates the object.
-Andrew.
More information about the bazaar
mailing list