Closed utgarda closed 13 years ago
I think you can get around this for the time being by passing in a :pointer there. the cp_static_inline is a crazy little work around for the static inline methods that chipmunk uses all over the place.
Cool. If that works, it would mean this typing has about as much value as comments. So it can be easily covered in some documentation, if docs are ever to appear.
utgarda: did that work for you?
Seems like a yes. Only checked for cpSpatialIndexQuery though ( last commit just now ) , but I have a good feeling about that :) More use cases to test can appear only from practice, cause even chipmunk's examples don't give much index query sample code. When I cover everything I need and finally start using it, maybe I'll invent better specs for this.
Oh no, it did not work. Trying to pass a method, when there's a :pointer in a cp_static_inline signature instead of a properly defined callback results in error messages like ":pointer argument is not a valid pointer"
Hi m8, here's what I got this week. Seems like I successfully chewed through those problems using nested FFI structs. But there's a new one:
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
result in errors :
Should we go to jacius with a feature request for NiceFFI, or to FFI maintainers, or maybe you can fix it?
There are many more of static inline functions with signatures like that, so this is pretty much a show-stopper. Please advise something here.
Good news: