title: objective-c macro for a variadic function
body: <p>Here's an example of what i'm trying to achieve. I'm trying to create a macro, that would look like this:</p>
  
  <pre><code>SOMEMACRO(obj, obj, obj, ..., obj);
  </code></pre>
  
  <p>The macro would compile to:</p>
  
  <pre><code>some_function(obj, obj, obj, ..., obj, SOMETHING_ELSE, SOMETHING_ELSE);
  </code></pre>
  
  <p>Here's an example macro for a 1 parameter function:</p>
  
  <pre><code>#define SOMEMACRO(x) some_function(x, SOMETHING_ELSE, SOMETHING_ELSE)
  </code></pre>
  
  <p>But it only works with one parameter (x)</p>
  
  <p>So basically i need the same thing but so that i could pass a viariable number of arguments. It would be nice that the compiler took whatever is between ( and ) and simply replaced X with it. I'm not sure if i was very clear about the problem, but i hope you understood.</p>
  
  <p>Thanks for any help.</p>