Skip to contentSkip to conversation

kernel.h: provide array iterator

RFC PATCH Alexey Dobriyan 1 participant 1 message Mar 16, 2018

lore
Share & tools
lore
#0 lore raw

Proper form for iteration over an array is below:

	int a[] = {1, 2, 3, 5};
	for (int x: a) {
		...
	}

Your macro forces an iterator to be pointer which is uh-oh.