Skip to content

[smart_holder] Disable internals version 4 when including smart_holder.h #5525

New issue

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

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

Already on GitHub? # to your account

Closed

Conversation

rhaschke
Copy link
Contributor

Building smart_holder branch w/o smart_holder support doesn't make sense and should be flagged early and clearly.

... when including smart_holder.h
@rwgk
Copy link
Collaborator

rwgk commented Feb 16, 2025

static_assert(PYBIND11_INTERNALS_VERSION >= 6,
              "pybind11 ABI version 6 is required for smart_holder functionality.");

That assertion isn't actually true (it would have to be >= 106), but see #5524 (comment).

I hope that we don't have to make changes here.

@rhaschke rhaschke force-pushed the disable-internals-version-4 branch from 9336325 to 0a130f2 Compare February 17, 2025 07:20
@rhaschke
Copy link
Contributor Author

I wanted to ensure that smart_holder.h is not accidentally used with PYBIND11_INTERNALS_VERSION < 106.

@rwgk
Copy link
Collaborator

rwgk commented Feb 17, 2025

Let me first try to get the smart_holder branch merged.

Based on what I found out under #5529, there is no good reason for the current #ifdef acrobatics (I mean what exists already). I'll try to radically simplify.

@rhaschke rhaschke closed this Feb 23, 2025
@rhaschke rhaschke deleted the disable-internals-version-4 branch February 23, 2025 08:22
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants