kristianlm / chicken-bind Goto Github PK
View Code? Open in Web Editor NEWA modified chicken-bind for better support of passing structs by value
A modified chicken-bind for better support of passing structs by value
I have bind 1.5.2 installed and I still get the instance-ref error exhibited by:
echo "class Foo {}; class Bar { public: void foo(Foo &foo); }; " | chicken-bind - -o -
I was trying to use chicken-bind with the gl3.h header that comes with the OpenGL framework on MacOS 10.8.3 and XCode when I ran into the following bug.
When chicken-bind parses the following function signature:
GLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei count, GLenum type, const GLvoid const *indices, GLsizei primcount);
it produces this error:
Error: bad argument list syntax: (const star (id "indices") comma (id "GLsizei") (id "primcount") close-paren)
Here is a simple example which demonstrates the error:
(use bind)
(import chicken scheme foreign)
(bind* #<<EOF
void this_works(const void **foo) {
}
EOF
)
;(bind* #<<EOF
; void this_doesnt(const void* const *foo) {
; }
;EOF
;)
I can work around this behaviour by removing the second const from the signature, but it would be nice if chicken-bind supported this. I'm not sure how to make the fix myself, as I've just started learning scheme.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.