Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use malloc on non-Windows platforms #3095

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

sivadeilra
Copy link
Collaborator

This is part of fixing #3083 . This allows non-Windows code to use more of the COM support from windows-core.

This changes the heap_alloc function (and related) to use malloc on non-Windows platforms, instead of HeapAlloc.

With this change, I can now build DWriteCore using windows-rs crates.

@riverar
Copy link
Collaborator

riverar commented Jun 12, 2024

Cool!

@sivadeilra
Copy link
Collaborator Author

sivadeilra commented Jun 12, 2024

Oh wait, I was wrong. There's still a bunch of other symbols that I'll need to deal with, for DWriteCore. Like all of the VARIANT conversions that call into external functions. Still, this PR gets me one step closer.

@kennykerr kennykerr merged commit 66d8769 into microsoft:master Jun 13, 2024
91 checks passed
@riverar
Copy link
Collaborator

riverar commented Jun 13, 2024

@sivadeilra I think we could eliminate those VariantToProp/PropToVariant conversion functions altogether and just do the conversions ourselves (being careful to copy strings, convert filetimes, handle clsids, etc.). Or maybe a smaller step would be to just cfg! them away and see if anyone even needs them.

mati865 pushed a commit to mati865/windows-rs that referenced this pull request Jun 15, 2024
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.

3 participants