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

[stdlib] List.extend uses origin on its UnsafePointer logic. #4043

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rd4com
Copy link
Contributor

@rd4com rd4com commented Mar 1, 2025

Hello,
this small commit is to integrate the origin parameter into the existing implementation.

(during logic on UnsafePointer to the other arg)

For example, if other^.__del__() is added before the loop, an error comes on move_pointee_into:
"uninitialized value other"

(preventing moving of values out of an maybe freed pointer)

The origin parameter makes sure that other is not __del__ while

we use the UnsafePointer to it.

Not sure if needed here, but it feels like a nice thing ! 👍

Hello,
this small commit is to integrate the `origin` parameter into
the existing implementation.

(during logic on `UnsafePointer` to the `other` arg)

For example, if `other^.__del__()` is added before the loop,
an error comes on `move_pointee_into`:
"uninitialized value other"

(preventing moving of values out of an maybe freed pointer)

The `origin` parameter makes sure that `other` is not `__del__` while

we use the `UnsafePointer` to it.

Not sure if needed here, but it feels like a nice thing ! 👍

Signed-off-by: rd4com <144297616+rd4com@users.noreply.github.com>
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