title: Pymunk drawing utils not working
body: <p>I am struggling to setup <code>pymunk</code> on my Ubuntu 16.04. I am using virtualenv, I have Python 3.5.2, pymunk 5.3.0 and cffi 1.11.0 installed. </p>
  
  <p>I tried a very simple code first; basically, I created an empty <code>Space</code> and called <code>step</code> on it and everything worked smoothly. However, when I try to visualize it and create <code>DrawOptions</code> instance, I get strange errors, which I can't decipher. Also, I tried <code>matplotlib_util</code> and <code>pygame_util</code>, but both failed to create <code>DrawOptions</code>.</p>
  
  <p>This is the code snippet I used:</p>
  
  <pre><code>    import pymunk
      import pyglet
      import pymunk.pyglet_util
  
      s = pymunk.Space()
      options = pymunk.pyglet_util.DrawOptions()
  
      s.debug_draw(options)
  
      # s.step(0.02)
  </code></pre>
  
  <p>This is the output I get:</p>
  
  <pre><code>    Loading chipmunk for Linux (64bit) [/home/wm/.virtualenvs/cv/lib/python3.5/site-packages/pymunk/libchipmunk.so]
      Traceback (most recent call last):
        File "/home/wm/.virtualenvs/cv/lib/python3.5/site-packages/cffi-1.11.0-py3.5-linux-x86_64.egg/cffi/api.py", line 167, in _typeof
          result = self._parsed_types[cdecl]
      KeyError: 'typedef void (*cpSpaceDebugDrawCircleImpl)(cpVect pos, cpFloat angle, cpFloat radius, cpSpaceDebugColor outlineColor, cpSpaceDebugColor fillColor, cpDataPointer data)'
  
      During handling of the above exception, another exception occurred:
  
      Traceback (most recent call last):
        File "/home/wm/.virtualenvs/cv/lib/python3.5/site-packages/cffi-1.11.0-py3.5-linux-x86_64.egg/cffi/cparser.py", line 276, in _parse
          ast = _get_parser().parse(fullcsource)
        File "/home/wm/.virtualenvs/cv/lib/python3.5/site-packages/pycparser/c_parser.py", line 152, in parse
          debug=debuglevel)
        File "/home/wm/.virtualenvs/cv/lib/python3.5/site-packages/pycparser/ply/yacc.py", line 331, in parse
          return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
        File "/home/wm/.virtualenvs/cv/lib/python3.5/site-packages/pycparser/ply/yacc.py", line 1199, in parseopt_notrack
          tok = call_errorfunc(self.errorfunc, errtoken, self)
        File "/home/wm/.virtualenvs/cv/lib/python3.5/site-packages/pycparser/ply/yacc.py", line 193, in call_errorfunc
          r = errorfunc(token)
        File "/home/wm/.virtualenvs/cv/lib/python3.5/site-packages/pycparser/c_parser.py", line 1761, in p_error
          column=self.clex.find_tok_column(p)))
        File "/home/wm/.virtualenvs/cv/lib/python3.5/site-packages/pycparser/plyparser.py", line 66, in _parse_error
          raise ParseError("%s: %s" % (coord, msg))
      pycparser.plyparser.ParseError: &lt;cdef source string&gt;:2:16: before: cpSpaceDebugDrawCircleImpl
  
      During handling of the above exception, another exception occurred:
  
      Traceback (most recent call last):
        File "pmtest2.py", line 5, in &lt;module&gt;
          options = pymunk.pyglet_util.DrawOptions()
        File "/home/wm/.virtualenvs/cv/lib/python3.5/site-packages/pymunk/pyglet_util.py", line 89, in __init__
          super(DrawOptions, self).__init__()
        File "/home/wm/.virtualenvs/cv/lib/python3.5/site-packages/pymunk/space_debug_draw_options.py", line 51, in __init__
          @ffi.callback("typedef void (*cpSpaceDebugDrawCircleImpl)"
        File "/home/wm/.virtualenvs/cv/lib/python3.5/site-packages/cffi-1.11.0-py3.5-linux-x86_64.egg/cffi/api.py", line 375, in callback
          cdecl = self._typeof(cdecl, consider_function_as_funcptr=True)
        File "/home/wm/.virtualenvs/cv/lib/python3.5/site-packages/cffi-1.11.0-py3.5-linux-x86_64.egg/cffi/api.py", line 170, in _typeof
          result = self._typeof_locked(cdecl)
        File "/home/wm/.virtualenvs/cv/lib/python3.5/site-packages/cffi-1.11.0-py3.5-linux-x86_64.egg/cffi/api.py", line 155, in _typeof_locked
          type = self._parser.parse_type(cdecl)
        File "/home/wm/.virtualenvs/cv/lib/python3.5/site-packages/cffi-1.11.0-py3.5-linux-x86_64.egg/cffi/cparser.py", line 476, in parse_type
          return self.parse_type_and_quals(cdecl)[0]
        File "/home/wm/.virtualenvs/cv/lib/python3.5/site-packages/cffi-1.11.0-py3.5-linux-x86_64.egg/cffi/cparser.py", line 479, in parse_type_and_quals
          ast, macros = self._parse('void __dummy(\n%s\n);' % cdecl)[:2]
        File "/home/wm/.virtualenvs/cv/lib/python3.5/site-packages/cffi-1.11.0-py3.5-linux-x86_64.egg/cffi/cparser.py", line 278, in _parse
          self.convert_pycparser_error(e, csource)
        File "/home/wm/.virtualenvs/cv/lib/python3.5/site-packages/cffi-1.11.0-py3.5-linux-x86_64.egg/cffi/cparser.py", line 307, in convert_pycparser_error
          raise CDefError(msg)
      cffi.error.CDefError: cannot parse "typedef void (*cpSpaceDebugDrawCircleImpl)(cpVect pos, cpFloat angle, cpFloat radius, cpSpaceDebugColor outlineColor, cpSpaceDebugColor fillColor, cpDataPointer data)"
      &lt;cdef source string&gt;:2:16: before: cpSpaceDebugDrawCircleImpl
  </code></pre>
  
  <p>What do you think is causing that? Is that the python version I use, or maybe cffi compilation is faulty?</p>