List of multiple arguments with NS_REQUIRES_NIL_TERMINATION

I have a function - (id) func: params1, ... NS_REQUIRES_NIL_TERMINATION and2: params2, ... NS_REQUIRES_NIL_TERMINATION;

The compiler says: error: expected `; 'before' and 2 'Is there a way to make a function with two lists of arguments?

+3
source share
1 answer

Simply put: no. It's impossible.

There is, however, a workaround; you can pass instead two pointers to idthat work with null-terminated arrays, for example:

- (id)method:(id *)part_one withTwo:(id *)part_two

:. nil - . ( !)

+6

Source: https://habr.com/ru/post/1742822/


All Articles