floooh / sokol

minimal cross-platform standalone C headers
https://floooh.github.io/sokol-html5
zlib License
6.82k stars 475 forks source link

Update gen_nim.py #858

Closed Angluca closed 8 months ago

Angluca commented 1 year ago

c: int uint = nim: int uint = x64:8byte, x32:4byte c: type * = nim: ptr type or pointer = c:null, nim=nil nim use byte or uint8 instead char not use char type name now, But have cchar because is c type.

Angluca commented 1 year ago

I've change sokol-nim example\/noninterleaved.nim

floooh commented 1 year ago

Hmm are these changes required because the most recent nim dev version breaks now? (or are they optional and just "nice to have")

I'd rather wait until nim stabilizes again to reduce the frequency of necessary updates to the bindings (I'm starting to think that the unsafeAddr => addr change was probably a bit too hasty, because it forces people to move from the stable version to the dev version).

Angluca commented 1 year ago

Nim will upgrade to stable v2.0 ( v1.6.x current now ) within the year. There's a lot of changes and more new func in the new version Things that will be dropped in the new version Personally, I think it's best to change things in advance, Because it's a lot of work to change things when you're have ( <= v1.6 ) project.

# These all version support ( v1.6 is use byte not char type name )
c: int uint = nim: int uint = x64:8byte, x32:4byte
c: type * = nim: ptr type or pointer = c:null, nim=nil
nim use byte or uint8 instead char not use char type name now,
But have cchar because is c type.