How to add multiple inputs to va_list

I need to add multiple inputs to a va_list. The first one is going to be a integer and the second one is going to be a pointer to another method which I plant to invoke at a later point of time. The sample code is as below:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
va_list adjustVarArgs( tag_t hostObject, ... )
{
    va_list adjustedArgs;
    va_start( adjustedArgs, hostObject );
    ITK_delete_exprs_ptr deleteExprsCallBack = &deleteExprObjects;

    va_start( adjustedArgs, deleteExprsCallBack );
    va_end( adjustedArgs );

    return adjustedArgs;
}

int Cfg0VariantConfigSavePost( METHOD_message_t * msg, va_list args )
{
    va_list largs;
    va_copy( largs, args );
    tag_t hostObject = va_arg( largs, tag_t );
    va_end( largs );

    va_list adjustedArgs = adjustVarArgs( hostObject );
    return Fnd0VariantConfigSavePost( msg, adjustedArgs );

    return ITK_ok;
}


deleteExprObjects is a method which I am interested in. On the whole, I need to store
1. hostObject
2. pointer to function: deleteExprsCallBack.

Please let me know how this can be done.

Note that by the time the code reaches Cfg0VariantConfigSavePost, va_list already has hostObject in it. I want to add the function pointer information on top of it too.

Thanks,
Pavan.
Topic archived. No new replies allowed.