Modifying data returned by __builtin_apply_args()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Listmembers,

I'd like to omit the first parameter in the data object which
__builtin_apply_args() returns.


Example:
-----------------

/* function to be called */
void fun( int p0, int p1, int p2) {
 /* do something */
}

/* function call wrapper */
void call( void (*fun)(), int p0, ...) {
 int size;
 void **args;

 size = CalculateSize(); /* leaving aside details*/
 args = __builtin_apply_args();

 /* --> modify args here */

 __builtin_apply( fun, args, size);
}

/* using the above */
...
call( &fun, 42, 0, 8);
...
-----------------

How do I strip the function pointer passed as first parameter
to 'call()' from 'args'?

If you bothered reading up to this point, thanks a lot
for your time.

Cheers,
Frank

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux