Quoth Liane Praza on Wed, Oct 15, 2008 at 02:21:11PM -0700: > >I presume you mean the case where the string contains "-1,1". Won't > >strtoull() fail on the '-' before we reach the min > max comparison? > > It doesn't fail in the test I just wrote.
Wow. What a great feature. > >And what about the int out-of-range cases? > > The checks for errno are correct, as the number may be too large to > represent in an int, but not a count. Hmm, indeed. I think you should mention in the manpage that these CONSTRAINT_VIOLATED errors can happen when the property is the wrong type. And possibly add a comment to the code. > I could change the check for min > max in the int function, but it'll > probably invalidate some of our tests. Think it's important enough to > make changes both in the tests and the code? If so, I can. Yes. I don't think it's important enough to delay integration, though. David