Closed FSMaxB closed 7 years ago
Sometimes, the same operation is done on many different inputs, in this case a foreach macro that can apply a macro in a loop would be quite useful.
foreach
Take this for example:
buffer_destroy_from_heap_and_null(alice_private_identity); buffer_destroy_from_heap_and_null(alice_public_identity); buffer_destroy_from_heap_and_null(alice_private_ephemeral); buffer_destroy_from_heap_and_null(alice_public_ephemeral); buffer_destroy_from_heap_and_null(bob_private_identity); buffer_destroy_from_heap_and_null(bob_public_identity); buffer_destroy_from_heap_and_null(bob_private_ephemeral); buffer_destroy_from_heap_and_null(bob_public_ephemeral); buffer_destroy_from_heap_and_null(send_header_key); buffer_destroy_from_heap_and_null(send_message_key); buffer_destroy_from_heap_and_null(public_send_ephemeral); buffer_destroy_from_heap_and_null(current_receive_header_key); buffer_destroy_from_heap_and_null(next_receive_header_key); buffer_destroy_from_heap_and_null(receive_message_key);
This could be written as:
foreach(buffer_destroy_from_heap_and_null, alice_private_identity, alice_public_identity, alice_private_ephemeral, alice_public_ephemeral, bob_private_identity, bob_public_identity, bob_private_ephemeral, bob_public_ephemeral, send_header_key, send_message_key, public_send_ephemeral, current_receive_header_key, next_receive_header_key, receive_message_key )
This also relates to #83.
Probably not worth it.
Sometimes, the same operation is done on many different inputs, in this case a
foreach
macro that can apply a macro in a loop would be quite useful.Take this for example:
This could be written as:
This also relates to #83.