nim-lang / c2nim

c2nim is a tool to translate Ansi C code to Nim. The output is human-readable Nim code that is meant to be tweaked by hand before and after the translation process.
MIT License
509 stars 63 forks source link

size_t should be replaced by uint, not csize #181

Closed stefantalpalaru closed 3 years ago

stefantalpalaru commented 4 years ago

Since this tool is being used to interface with C and C++ libraries, we can't afford that whole "we'll change the C standard in our leaky abstraction" silliness, so what is an unsigned integer in C should be the same in the Nim wrapper.

Relevant Nim silliness: https://github.com/nim-lang/Nim/issues/12187

Araq commented 4 years ago

Don't we have csize_t now in system.nim we can use instead?

stefantalpalaru commented 4 years ago

Yes, csize_t will be just as good, once it reaches a release.

Araq commented 3 years ago

Now uses csize_t.