You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the companion to #60 adding the Julia side of the wrapper -- it would make sense to me to review/merge that one separately, but this is close to complete from my perspective and should help with evaluating the C wrapper.
The libcclipper2 product is being added to Clipper2_jll by JuliaPackaging/Yggdrasil#14270, which is gated on #60. Until that JLL is published, place a matching local library at deps/libcclipper2.so, deps/libcclipper2.dylib, or deps/libcclipper2.dll for local testing. It must be built from deps/cwrapper/cclipper2.cpp with -DUSINGZ against the patched Clipper2 2.0.1 used by that Yggdrasil recipe.
The package loader and Project.toml will use the Clipper2_jll.libcclipper2 product once it is available. CI will fail until then.
I've marked this as a draft for now, since it needs to wait until the above PRs are merged.
Let an LLM try this pr out: built the wrapper against patched Clipper2 2.0.1 per Yggdrasil #14270 — 112/112 tests pass, docs clean. Fuzzed ~1000 boolean ops and stress-tested GC in the result callbacks; no issues.
One defect: Clipper64() / ClipperOffset() don't check the NULL return documented at cclipper2.h:79 (engine.jl:71, offset.jl:23), so a failed create segfaults on first use instead of throwing.
One question: the *_z entry points have no Julia surface: only runtests.jl reaches them via raw ccall. Should those be wrapped?
One defect: Clipper64() / ClipperOffset() don't check the NULL return documented at cclipper2.h:79 (engine.jl:71, offset.jl:23), so a failed create segfaults on first use instead of throwing.
Right, fixed.
One question: the *_z entry points have no Julia surface: only runtests.jl reaches them via raw ccall. Should those be wrapped?
Yeah, they should. Added Z versions of the types, dispatch on Z paths for the add_...! methods, and execute_polytree_z.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the companion to #60 adding the Julia side of the wrapper -- it would make sense to me to review/merge that one separately, but this is close to complete from my perspective and should help with evaluating the C wrapper.
The
libcclipper2product is being added toClipper2_jllby JuliaPackaging/Yggdrasil#14270, which is gated on #60. Until that JLL is published, place a matching local library atdeps/libcclipper2.so,deps/libcclipper2.dylib, ordeps/libcclipper2.dllfor local testing. It must be built fromdeps/cwrapper/cclipper2.cppwith-DUSINGZagainst the patched Clipper2 2.0.1 used by that Yggdrasil recipe.The package loader and
Project.tomlwill use theClipper2_jll.libcclipper2product once it is available. CI will fail until then.I've marked this as a draft for now, since it needs to wait until the above PRs are merged.