Breush / odin-binding-generator

An Odin library to convert a C header file into an Odin binding file.
MIT License
42 stars 21 forks source link

Compilation fails on recent versions of Odin #10

Closed Inch4Tk closed 4 years ago

Inch4Tk commented 4 years ago

With Odin compiled on the most recent git commit in master, compiling any of the examples will give me these two errors:

D:/Code/Odin/shared/odin-binding-generator/bindgen/c-parser-evaluate.odin(172:9) Assignment count mismatch '1' = '2'
D:/Code/Odin/shared/odin-binding-generator/bindgen/c-parser-evaluate.odin(176:9) Assignment count mismatch '1' = '2'

Compiling and running with the tagged v0.12.0 of Odin works without any issues.

Platform Win10.

Breush commented 4 years ago

Apparently API for strconv.parse_f64 changed. Do you know in what extent?

I won't update until new officially tagged version.

Breush commented 4 years ago

In https://github.com/odin-lang/Odin/commit/190932935c3f6e4398934ec766214b61adc1bbca#diff-f161bde54e8dd2ecc624cf8b2743f600 and https://github.com/odin-lang/Odin/commit/704ee9f8510cdaa75fe207316957efb70e8269de#diff-f161bde54e8dd2ecc624cf8b2743f600 the signatures strconv.parse_* changed to return a pair of values. It is now -> (value: f64, ok: bool). Updating odin-binding-generator to support that will be easy, but we will loose compatibility with older versions of Odin. As it is still in version "0", it is OK for us.