shithub: scc

ref: f2f8265148da2575342a68a2b55e3bade3551e33
dir: /src/libmach/objtraverse.c/

View raw version
#include <stdio.h>

#include <scc/mach.h>

#include "libmach.h"

int
objtraverse(Obj *obj, int (*fn)(Objsym *, void *), void *data)
{
	Objsym *sym;

	for (sym = obj->head; sym; sym = sym->next) {
		 if (!(*fn)(sym, data))
			return 0;
	}
	return 1;
}