G33kDude / cJson.ahk

AutoHotkey JSON library using embedded C for high performance
https://www.autohotkey.com/boards/viewtopic.php?f=6&p=408453
MIT License
77 stars 8 forks source link

Release v0.5.0 #5

Open anonymous1184 opened 1 year ago

anonymous1184 commented 1 year ago

Just a heads-up on two non-issues:

There is no distributable for the latest version. When I build it, Yunit reported an error for floats on x64.

The expected from Test_Floats() is the same for x86 and x64, but only for AHK_L v1.1.36.02, with AHK_H v1.1.33.10 the test passes with different expectations.

So I guess the library is OK and AutoHotkey is making the mess.

G33kDude commented 1 year ago

0.5.1 has been built, but I don't have the time to make the release at this time. Floats are messy, but when I build 0.5.1 and run it on my local system I don't see any obvious issue with them. I know "works on my machine" is not generally helpful, but my time is limited to hunt down problems I don't myself face.

anonymous1184 commented 1 year ago

Floats are messy

Yes, my results are cray-cray. But that's on AHK:

In the image (versions same as OP):

Lx64 | Lx86
Hx86 | Hx64

image

So L is OK for 32, while H is OK for 64.


The empty arrays dumped as objects are because that's the default:

image

Didn't notice before, as I manually set the others to true and this false, to have a visual on the AHK side of the defaults.

So it can be done on the AHK side or in dumps.c:

static bool bEmptyObjectsAsArrays = true;
// from:
static bool bEmptyObjectsAsArrays = false;

Even moving it alongside the other export to shared.c? (to keep consistency)

image


In the oddities section: I was having an issue not being able to build, repo needs to be cloned with autocrlf set to true, otherwise the mcode is not injected and the MCL include is not removed.