On Thu, 1 Apr 2004, eno wrote:

>Greg Obleshchuk wrote:
>
>> Hi Chris,
>> Thanks for your reply.
>> I do have a different way of handling it in C# but I am passing the call on to the 
>> sqlite_vmprintf function (in printf.c and that accepts a va_list)
>> The way around it that I use is having a switch statement and if the use passes one 
>> parameter the I calls sqlite_vmprintf with one parame , if two it calls it with two 
>> and so on.  If I could build a va_list then I would built it and just call 
>> sqlite_vmprintf once.
>
>Hi Greg,
>
>it *might* work building up a (CPU-)stack-like structure holding all the
>parameters, which, of course should be only int's and const char*. To
>outline this, have a look at this example, which is C++:
>
 <snip>
>
>       // now we put the values on to a pseudo "stack".
>       // Create a va_arg for the first parameter. In the downward
>       // growing scenario this is at p + (v.size()-1)*el
>       va_list ap;
>       va_start(ap, (int&)(p + (v.size()-1)*el));
>
>       // now do whatever you want...
>}
>
>well, above code is what I would try... and of course, it is fully
>nonportable. Maybe I would consider not using sqlite_vmprintf)( at all.

If all he is doing is building up a string, surely he'd be better off
using C# to do that, and treating the string as atomic.

>
>/eno
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

-- 
    /"\
    \ /    ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
     X                           - AGAINST MS ATTACHMENTS
    / \

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to