title: Method lookup in C
body: <p>I'm trying to make a game in C, using OOP. I ran into the problem of being able to look up methods in superclasses.</p>
  
  <p>At the moment, my objects look more or less like this:</p>
  
  <pre><code>typedef unsigned int PTR
  
  struct Object{
      PTR super;
      PTR (method1 (PTR self, ...));
      .
      .
      .
      PTR (methodN (PTR self, ...));
  }
  </code></pre>
  
  <p>I want to look up a method, and if it's not found in an object, to iteratively look for it in it's super, it's super's super, etc, and return 0 (method not found) if <code>super == NULL</code> at some point.</p>
  
  <p>How could I achieve this?</p>