[asterisk-dev] [asterisk-commits] eliel: branch group/appdocsxml r151893 - in /team/group/appdocsxml: include/a...

Kevin P. Fleming kpfleming at digium.com
Tue Oct 28 08:34:35 CDT 2008

Eliel Sardañons wrote:

> Maybe we can discuss if it makes sense to do those typedefs
> (ast_xml_text and ast_xml_attr). But the casting is being done on
> ->AST_XML_NAME (actually on node->name this is because of a signedness
> warning) and not when working with the typedefs ast_xml_attr and
> ast_xml_text.
> ->name is defined as xmlChar * (libxml2 implementation, maybe 'unsigned
> char *' ??? didn't check it...).

Well, that is some of it, but I also saw casting of 'paramtype' in pbx.c
 which is an ast_xml_attr *. It's inconsistent though... in some places
when it is being passed to ast_true() or ast_false() it is being cast to
 'const char *' and in other places it is not being cast at all. Since
it is typedef'd to char anyway, the casts really shouldn't be needed,
but if they are then we need to figure out whether the typedefs are
really providing any value.

Kevin P. Fleming
Director of Software Technologies
Digium, Inc. - "The Genuine Asterisk Experience" (TM)

More information about the asterisk-dev mailing list