Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > 78c129e4a46a64625b53d61bd2b90fab > files > 327

python-cython-0.15-0.1mdv2010.2.i586.rpm

/*
 *   An example of a C API that provides a callback mechanism.
 */

#include "cheesefinder.h"

static char *cheeses[] = {
  "cheddar",
  "camembert",
  "that runny one",
  0
};

void find_cheeses(cheesefunc user_func, void *user_data) {
  char **p = cheeses;
  while (*p) {
    user_func(*p, user_data);
    ++p;
  }
}