improvements to ctype-compatibility.py

Alexandre Oliva aoliva@redhat.com
Tue Dec 23 00:32:00 GMT 2014


On Dec 19, 2014, Mike FABIAN <mfabian@redhat.com> wrote:

> I don’t like it because it just looks uglier without really improving
> anything.

So how about defining cperror as a method of an “error_counting” class?
Then you instantiate two error_counting objects, one for the old and the
one for the new file, and pass it down to the test functions, or create
a single object and introduce a function that returns the accumulated
count before resetting it.

These are probably more in line with the intent of the rule to avoid
“global”, but the former is more in line with the idea of avoiding
global state.

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer



More information about the Libc-alpha mailing list