shithub: scc

ref: 71bd895b5dcedc3e24e2a0b5710b1ba01a955cfc
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;
}