Skip to content

Can't use a callback in cp_static_inline signature #19

Description

@utgarda

cp_static_inline doesn't take as function argument types any callbacks defined earlier in code. Never before was an issue, cause it's the first time static inline functions in chipmunk API have something except pointers and structs for args.

Thus, lines like this

   cp_static_inline :cpSpatialIndexEach, [:pointer, :cpSpatialIndexIteratorFunc, :pointer], :void

result in errors :

/chipmunk-ffi/lib/chipmunk-ffi.rb:35:in `initialize': Invalid parameter type (:cpSpatialIndexIteratorFunc) (TypeError)

Using a :pointer instead of a defined callback doesn't work either, passing a method where a :pointer argument is expected gives this:

:pointer argument is not a valid pointer

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions