Added a bint c type, which is a c int that coerces to and from python objects...
Added a bint c type, which is a c int that coerces to and from python objects via the boolean routines. The purpose of this type is to free the coder from having to use bool() when retrieving and returning semantically "boolean" values (e.g. the result of a compare). The bint type is a subclass of the int type, and the only difference is that it uses PyBool_FromLong and PyObject_IsTrue rather than PyInt_FromLong and PyInt_AsLong. Arithmatic on bints will return ints. Where it makes sense, several builtin functions have been re-declared to return bints, as well as comparisons and the boolean operations or, and, and not.
Showing
Please register or sign in to comment