Translate _d_delstruct to template#3639
Conversation
Signed-off-by: Teodor Dutu <teodor.dutu@gmail.com>
|
Thanks for your pull request and interest in making D better, @teodutu! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + druntime#3639" |
Signed-off-by: Teodor Dutu <teodor.dutu@gmail.com>
|
Can you refactor the original (non-template) version of the hook to call the new (template) one? That way, the change would be easier to review, since the net result would be that most of the code would be moved to a new function and all of the existing tests would still exercise the code paths. |
The signature of the old hook is this: extern (C) void _d_delstruct(void** p, TypeInfo_Struct inf) @weakIn order to call the new hook from it, I would need to cast |
Signed-off-by: Teodor Dutu <teodor.dutu@gmail.com>
|
You're right. For some reason I didn't check carefully the new implementation, but instead I assumed that it would use the same typeinfo-based logic that this would later be changed to template-driven, which I see you have already done. |
This implements a template version of
_d_delstructto replace the homonymous function fromrt.lifetime.d.