var x = haxe.io.Bytes.alloc(0);
cpp.Pointer.ofArray(x.getData());
var y = haxe.io.Bytes.ofHex("");
trace(x.compare(y));
The output is 1. If the second line is removed, the output is 0 as expected. Although x.length and y.length remain at 0, in the actual Array::Memcmp implementation, length for the first argument is 1.
The output is
1. If the second line is removed, the output is0as expected. Althoughx.lengthandy.lengthremain at0, in the actualArray::Memcmpimplementation,lengthfor the first argument is1.