Closed cyblue9 closed 5 years ago
actually, sorry - I've just reverted this for now.
The bindings are actually to the extemporelang fork of nanovg. In particular, because xtlang code isn't ABI-compatible with C code, passing structs on the stack (e.g. NVGcolor
s) is problematic. I used to have a bunch of "wrapper" code to make it all pass-by-reference (and we just deal with the memory allocation thing).
So, in those cases they aren't actually typos - they're deliberate.
Having said that... it's a while since I touched that stuff, and I really should see if it's still all working fine. It's on my to-do list, but I'll just revert the pull request for now, and re-apply the changes later if they make sense. Sorry about the confusion.
No problem.
The bindings are actually to the extemporelang fork of nanovg. In particular, because xtlang code isn't ABI-compatible with C code, passing structs on the stack (e.g. NVGcolors) is problematic. I used to have a bunch of "wrapper" code to make it all pass-by-reference (and we just deal with the memory allocation thing).
Oh, I see !
I wanted to draw some graphs with /lib/external/nanovg.xtm. But, it didn't work. As a result of thinking a lot, I thought that it was a bug, I sent a pull request.
But, I checked my code again. I found a mistake in my code. Therefore, this pull request is incorrect. Sorry. Really Sorry.
To avoid making the same mistake again, I need to write the xtlang/nanovg wrapper library as soon as possible.
It's all good 🙂
There are some type error of functions return value and arguments.
Example: nanovg
[Before fixed]
[After fixed]
The second argument is
NVGcolor
type(not pointer).Please review!