[XML-SIG] [Q] xml.utils.boolean C API

Mike Olson Mike.Olson@fourthought.com
11 Sep 2002 09:03:33 -0600


On Tue, 2002-09-10 at 13:10, Fred L. Drake, Jr. wrote:
> 
> The C API to the boolean module, expressed in extensions/boolean.h,
> does not appear to be used.  It certainly can't be used as-is when the
> module is built to be dynamically loaded.  The boolean_new() function
> it references is not present in boolean.c at all.

It confused me as well.  But it is actually used.  In the init of the
module, we expose a ref to false and true.  The are the only two
instances of boolean ever created.

> 
> Is there any reason this header is used, or can the needed information
> simply be merged into the implementation?
> 
> The implementation also uses DL_EXPORT for a few things that should be
> static, and almost nobody outside the Python core needs to use the
> tp_print slot; the use made by this code is certainly avoidable in
> efficient ways.
> 
> Uche, Mike, et al.:  any objection to a little cleanup here?

Not at all.  Though, you might need to here from Jeremy before you do
much as he wrote it.

Mike

> 
> Thanks!
> 
> 
>   -Fred
> 
> -- 
> Fred L. Drake, Jr.  <fdrake at acm.org>
> PythonLabs at Zope Corporation
> 
> _______________________________________________
> XML-SIG maillist  -  XML-SIG@python.org
> http://mail.python.org/mailman/listinfo/xml-sig
-- 
Mike Olson                                Principal Consultant
mike.olson@fourthought.com                +1 303 583 9900 x 102
Fourthought, Inc.                         http://Fourthought.com 
PO Box 270590,                            http://4Suite.org
Louisville, CO 80027-5009, USA
XML strategy, XML tools, knowledge management