[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Eliminate "will never be null" warnings in smobs.tcc. (issue 1539700
Re: Eliminate "will never be null" warnings in smobs.tcc. (issue 153970043 by address@hidden)
Sat, 04 Oct 2014 04:32:43 +0000
On 2014/10/04 04:12:14, Dan Eble wrote:
It's verbose, but it does the trick portably (I think).
Too clever. I don't want to obfuscate the code like that (bringing type
overloading into play) just to dance around a warning. print_smob does
not need a check: we'll always set something other than the default
print routine. The other checks are going the way of mark_smob: just
create a do-nothing default function, and don't bother installing it
when it has not been overridden.
I went through that dear-compiler-are-you-serious dance when turning
mark_smob into a member function (incidentally, that's what print_smob
is going to do as well). No point in doing the others in a different