]> git.bitcoin.ninja Git - ldk-java/commit
[C#] Use `Heap{Alloc,Free}` rather than `malloc`/`free` on Windows
authorMatt Corallo <git@bluematt.me>
Thu, 1 Feb 2024 17:31:45 +0000 (17:31 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 1 Feb 2024 19:01:06 +0000 (19:01 +0000)
commitdb75028fd2cef77ce1f3c21451bb7d84227cccf0
tree2c2ab4bf2b7d9920e074382fa3326ea27fc4553a
parent13de6f1f79acbe4d072bf888d377134dbbf38f74
[C#] Use `Heap{Alloc,Free}` rather than `malloc`/`free` on Windows

We generally expect to allocate pointers in C which Rust will free,
and vice versa. On Windows, this requires that we use the same
allocation path as Rust's stdlib does, which is actually
`Heap{Alloc,Free}`, not `malloc`/`free`. Here, we swap the heap
allocation functions we call, fixing heap corruption issues on
Windows.
csharp_strings.py
genbindings.py
genbindings.sh