Skip to content

NativeCalls initializes its handles inline - #349

Closed
dfa1 wants to merge 2 commits into
mainfrom
native-calls-inline-handles
Closed

dfa1 wants to merge 2 commits into
mainfrom
native-calls-inline-handles

Conversation

@dfa1

@dfa1 dfa1 commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

What and why

Tidies the handle declarations in NativeCalls:

  • MH_CLOSE and MH_FREE are initialized inline; the static block is gone.
  • MH_FREE becomes private (nothing outside NativeCalls used it).
  • SIZE_T moves above the handles, since MH_MALLOC's descriptor uses it.

MH_MALLOC stays on the linker's default lookup. The first commit moved it to NativeLibrary.lookup, and the Windows build failed with UnsatisfiedLinkError: Symbol not found: malloc: a library lookup on Windows sees only the RocksDB DLL's own exports. The second commit restores the default lookup and records why in a comment.

Checklist

  • No test changes
  • NativeCallsTest and RocksIteratorTest pass locally on macOS; the full suite runs in CI
  • ./mvnw package -pl core -am -DskipTests passes
  • Every MH_ field keeps its prototype comment
  • CHANGELOG.md: left for the maintainer
  • Docs: none needed

🤖 Generated with Claude Code

dfa1 and others added 2 commits November 15, 2026 17:32
…h NativeLibrary

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…t on Windows

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dfa1 dfa1 changed the title NativeCalls initializes its handles inline and resolves malloc through NativeLibrary NativeCalls initializes its handles inline Nov 15, 2026
@dfa1 dfa1 closed this Nov 15, 2026
@dfa1

dfa1 commented Nov 15, 2026

Copy link
Copy Markdown
Owner Author

superseded by #350

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant