Fix crash when used in Blender.

When OpenNURBS is used through rhino3dm in Blender there is
a crash in Blender in its openvdb library due to the same named
symbol inflate_fast.

Rename the one we have in our zlib library to zinflate_fast to
prevent the crash from happening.
This commit is contained in:
Nathan Letwory
2024-07-10 10:46:32 +03:00
parent a14564cf09
commit 5fcd089d99
4 changed files with 22 additions and 22 deletions

View File

@@ -60,11 +60,11 @@
checking for available input while decoding.
- The maximum bytes that a single length/distance pair can output is 258
bytes, which is the maximum length that can be coded. inflate_fast()
bytes, which is the maximum length that can be coded. zinflate_fast()
requires strm->avail_out >= 258 for each loop to avoid checking for
output space.
*/
void inflate_fast(strm, start)
void zinflate_fast(strm, start)
z_streamp strm;
unsigned start; /* inflate()'s starting value for strm->avail_out */
{
@@ -302,7 +302,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
}
/*
inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe):
zinflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe):
- Using bit fields for code structure
- Different op definition to avoid & for extra bits (do & for table bits)
- Three separate decoding do-loops for direct, window, and write == 0