crystal-lang / crystal_lib

Automatic binding generator for native libraries in Crystal
138 stars 30 forks source link

Incorrect translation va_list to VaList #13

Closed aladagemre closed 8 years ago

aladagemre commented 8 years ago

When creating binding for igraph,

the crystal_lib generates "alias VaList = LibC::VaList" statement but it says "undefined constant LibC::VaList" when I include the generated content. I have to replace it with: alias VaList = UInt8[24] then it works.

https://github.com/igraph/igraph/search?p=3&q=va_list&utf8=%E2%9C%93 See the generated code: https://github.com/aladagemre/crystal-igraph/blob/0ce58a79bdeab565af3dca6e19bcfbf2285b9b9c/lib_igraph.cr

one comment: va_list is a variable list of arguments. translating it to LibC::VaList is incorrect.

DmitryBochkarev commented 8 years ago

current crystal master has LibC::VaList https://github.com/manastech/crystal/blob/master/src/libc.cr#L41

aladagemre commented 8 years ago

OK, it seems like its due to I'm using 0.9.1 (30 Oct) and the commit as made on Nov 3.