Closed ghidosoft closed 4 years ago
@ghidosoft Thanks! It looks like the tests are failing, but it seems that the error might not be coming from your changeset. I haven't looked at this recently, but I'll see if some node change caused the problem...
Yes, I looked into it but I could not point out the cause, I could not reproduce the error on my (Windows) machine.
https://github.com/no2chem/bigint-buffer/blob/master/src/index.spec.ts#L194 should be the test that fails but I don't see any difference with the previous tests. @no2chem if you could look into it it would be great, thanks!
@no2chem I think I nailed it. stack_buffer
is allocated on the stack but inside an if
. After exiting the if
that buffer was reused but it's compiler dependent when local variables gets allocated on the stack (i.e. per block or at the beginning of the function).
This behavior could be source of subtle bugs like maybe #12
@no2chem I added a Windows test:node
to Travis CI and compilation now runs fine even in cmd.exe
, let me know if it's ok.
This PR adds Windows support, now compilation runs fine and should still run fine also on GCC.
I also updated
microtime
to3.0.0
to allow Windows installation of dev dependencies, I changed a little thecompile
scripts inpackage.json
, it should work in both platforms.Tests are all green under Windows 10.
fixes #14