Skip to content

Convert virtualbase wrapper functions to friend functions (v2) #176

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

Merged
merged 5 commits into from
Feb 15, 2025

Conversation

mappu
Copy link
Owner

@mappu mappu commented Feb 15, 2025

Fixes: #175

Updates: #172

Miqt supported calling the base/super method of any virtual override function. This worked by (A) creating a virtualbase_... method wrapper in the subclass, and (B) also adding a C ABI function to call it.

Combine these into a single C ABI function, following the friend pattern of the new protected-method support. This reduces the number of functions generated in the translation unit.

This is v2 of the #172 PR that was rolled back.

@mappu mappu marked this pull request as draft February 15, 2025 01:35
@mappu mappu force-pushed the miqt-virtualbase-fix branch from 60b478a to 34c9353 Compare February 15, 2025 02:01
@mappu mappu changed the title Fix recursive calls in virtualbase friend functions Convert virtualbase wrapper functions to friend functions (v2) Feb 15, 2025
@mappu mappu marked this pull request as ready for review February 15, 2025 02:22
@mappu mappu merged commit 96ddff8 into master Feb 15, 2025
16 checks passed
@mappu mappu deleted the miqt-virtualbase-fix branch February 15, 2025 04:13
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.

Recursion in virtualbase friend functions
1 participant