OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] genx - string termination and bounding

[ Lists Home | Date Index | Thread Index ]

I don't like NULL as an argument because if I pass an uninitalized pointer 
happened to be NULL (and uninitialized pointer will be NULL in some flavours of C)
by omission, then instead of getting an error immediately, I see strange
behavior difficult to diagnose.

In fact, I would prefer asserts for non NULL in genxText

genxText(genxWriter *w, char *buf, char *end) {
  assert(buf!=NULL&&end>=buf);
  ...

genxTextZ(genxWriter *w,char *buf) {
  genxText(w,buf,buf+strlen(buf)); // it is fast, one will have to pass it with length anyway

David  




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS