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
Port CPython3.7 dictionary for numba internal use #3715
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fixes made. I've reviewed it all again with more concentration on safety, to this effect have programmed against the C API and stressed all the functions via this code in conjunction with valgrind. I've made a few more suggestions and comments, nothing major, once resolve this should be ready to merge.
numba/_dictobject.c
Outdated
|
||
/* Align size *sz* to pointer width */ | ||
static Py_ssize_t | ||
align(Py_ssize_t sz) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be called aligned_size
for clarity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant the function, not the arg :) apologies, that wasn't v. clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heh
numba/_dictobject.c
Outdated
|
||
/* Align pointer *ptr* to pointer size */ | ||
static void* | ||
palign(void *ptr) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps also switch this to being called aligned_pointer
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed to aligned_ptr
@@ -0,0 +1,193 @@ | |||
/* Adapted from CPython3.7 Objects/dict-common.h */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding all the commentary to this file, it's very useful.
Co-Authored-By: sklam <michael.lam.sk@gmail.com>
I'll need to do another round of py2.7 win32 compiler fixing |
VS2008 compilation is fixed. |
OK, I'm prepared to declare this "ready to merge". 💥 |
as titled.
TODO: