[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ Patch #491 ] typo in XMLRPC::begArray ?
From: |
Federico Montesino Pouzols |
Subject: |
Re: [ Patch #491 ] typo in XMLRPC::begArray ? |
Date: |
Mon, 26 Aug 2002 01:44:16 +0200 (CEST) |
>in xml.cpp: void XMLRPC::begArray()
>
> if (! fail && ! array)
> return;
>
>should be - if I understand it right -
>
> if (! fail && array)
> return;
Well, comparing with other methods, I think it should be like this:
void XMLRPC::begArray(void)
{
if(fault)
return; // fault responses do not have arrays.
if(!array) // note we do not need to check !fault again.
strBuf << "<param>";
array++; // arrays must be allowed to be nested
strBuf << "<array><data>" << endl;
}
And also, in
void XMLRPC::endArray(void)
{
if(!array)
return;
strBuf << "</data></array>";
if(!--array && !fault)
strBuf << "</param>";
strBuf << endl;
}
if(!--array && !fault) could be changed to if(!--array), since when
array is 1, we are sure we are not building a fault response. I think
know begArray and endArray match.
What do you think? Anyone else has another suggestion?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [ Patch #491 ] typo in XMLRPC::begArray ?,
Federico Montesino Pouzols <=