-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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] Deprecate .unsafe_cstr_ptr()
#3638
base: nightly
Are you sure you want to change the base?
[stdlib] Deprecate .unsafe_cstr_ptr()
#3638
Conversation
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
Thank for the cleanup! You may also want to add |
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
cstr_ptr != char_ptr
there could be types which need to add a null terminator. |
Hi @yinonburgansky I undestand your points, but that is what it means to work at an ABI level. Whoever uses sys.ffi knows that all operations are unsafe, it is their responsibility to know where and how pointers are coming in and out and ensure whatever "safety" can be obtained. Beyond the philosophical debate of what safety level we should guarantee, reducing the public API surface area of unsafe operations should be a goal i.e. having less of these |
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
…o into deprecate-unsafe-cstr-ptr
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
Deprecate
.unsafe_cstr_ptr()
. Closes #3601