shithub: scc

ref: 1055827d79c5371b019dfeec0fc91f2c5c4ebafd
dir: /src/libmach/objtraverse.c/

View raw version
#include <stdio.h>

#include <scc/mach.h>

#include "libmach.h"

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

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