-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Remove inline declarations in pxd files #17277
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,13 +11,13 @@ cdef extern from "khash_python.h": | |
PyObject **keys | ||
size_t *vals | ||
|
||
inline kh_pymap_t* kh_init_pymap() | ||
inline void kh_destroy_pymap(kh_pymap_t*) | ||
inline void kh_clear_pymap(kh_pymap_t*) | ||
inline khint_t kh_get_pymap(kh_pymap_t*, PyObject*) | ||
inline void kh_resize_pymap(kh_pymap_t*, khint_t) | ||
inline khint_t kh_put_pymap(kh_pymap_t*, PyObject*, int*) | ||
inline void kh_del_pymap(kh_pymap_t*, khint_t) | ||
kh_pymap_t* kh_init_pymap() | ||
void kh_destroy_pymap(kh_pymap_t*) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these are c-functions There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But they still trigger the warning when building. So apparently that does not matter There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Based on the comment in the cython issues, I understand that those will not be inlined anyhow when used in another cython module (cython/cython#1706 (comment)) |
||
void kh_clear_pymap(kh_pymap_t*) | ||
khint_t kh_get_pymap(kh_pymap_t*, PyObject*) | ||
void kh_resize_pymap(kh_pymap_t*, khint_t) | ||
khint_t kh_put_pymap(kh_pymap_t*, PyObject*, int*) | ||
void kh_del_pymap(kh_pymap_t*, khint_t) | ||
|
||
bint kh_exist_pymap(kh_pymap_t*, khiter_t) | ||
|
||
|
@@ -27,13 +27,13 @@ cdef extern from "khash_python.h": | |
PyObject **keys | ||
size_t *vals | ||
|
||
inline kh_pyset_t* kh_init_pyset() | ||
inline void kh_destroy_pyset(kh_pyset_t*) | ||
inline void kh_clear_pyset(kh_pyset_t*) | ||
inline khint_t kh_get_pyset(kh_pyset_t*, PyObject*) | ||
inline void kh_resize_pyset(kh_pyset_t*, khint_t) | ||
inline khint_t kh_put_pyset(kh_pyset_t*, PyObject*, int*) | ||
inline void kh_del_pyset(kh_pyset_t*, khint_t) | ||
kh_pyset_t* kh_init_pyset() | ||
void kh_destroy_pyset(kh_pyset_t*) | ||
void kh_clear_pyset(kh_pyset_t*) | ||
khint_t kh_get_pyset(kh_pyset_t*, PyObject*) | ||
void kh_resize_pyset(kh_pyset_t*, khint_t) | ||
khint_t kh_put_pyset(kh_pyset_t*, PyObject*, int*) | ||
void kh_del_pyset(kh_pyset_t*, khint_t) | ||
|
||
bint kh_exist_pyset(kh_pyset_t*, khiter_t) | ||
|
||
|
@@ -45,13 +45,13 @@ cdef extern from "khash_python.h": | |
kh_cstr_t *keys | ||
size_t *vals | ||
|
||
inline kh_str_t* kh_init_str() nogil | ||
inline void kh_destroy_str(kh_str_t*) nogil | ||
inline void kh_clear_str(kh_str_t*) nogil | ||
inline khint_t kh_get_str(kh_str_t*, kh_cstr_t) nogil | ||
inline void kh_resize_str(kh_str_t*, khint_t) nogil | ||
inline khint_t kh_put_str(kh_str_t*, kh_cstr_t, int*) nogil | ||
inline void kh_del_str(kh_str_t*, khint_t) nogil | ||
kh_str_t* kh_init_str() nogil | ||
void kh_destroy_str(kh_str_t*) nogil | ||
void kh_clear_str(kh_str_t*) nogil | ||
khint_t kh_get_str(kh_str_t*, kh_cstr_t) nogil | ||
void kh_resize_str(kh_str_t*, khint_t) nogil | ||
khint_t kh_put_str(kh_str_t*, kh_cstr_t, int*) nogil | ||
void kh_del_str(kh_str_t*, khint_t) nogil | ||
|
||
bint kh_exist_str(kh_str_t*, khiter_t) nogil | ||
|
||
|
@@ -61,13 +61,13 @@ cdef extern from "khash_python.h": | |
int64_t *keys | ||
size_t *vals | ||
|
||
inline kh_int64_t* kh_init_int64() nogil | ||
inline void kh_destroy_int64(kh_int64_t*) nogil | ||
inline void kh_clear_int64(kh_int64_t*) nogil | ||
inline khint_t kh_get_int64(kh_int64_t*, int64_t) nogil | ||
inline void kh_resize_int64(kh_int64_t*, khint_t) nogil | ||
inline khint_t kh_put_int64(kh_int64_t*, int64_t, int*) nogil | ||
inline void kh_del_int64(kh_int64_t*, khint_t) nogil | ||
kh_int64_t* kh_init_int64() nogil | ||
void kh_destroy_int64(kh_int64_t*) nogil | ||
void kh_clear_int64(kh_int64_t*) nogil | ||
khint_t kh_get_int64(kh_int64_t*, int64_t) nogil | ||
void kh_resize_int64(kh_int64_t*, khint_t) nogil | ||
khint_t kh_put_int64(kh_int64_t*, int64_t, int*) nogil | ||
void kh_del_int64(kh_int64_t*, khint_t) nogil | ||
|
||
bint kh_exist_int64(kh_int64_t*, khiter_t) nogil | ||
|
||
|
@@ -79,13 +79,13 @@ cdef extern from "khash_python.h": | |
khuint64_t *keys | ||
size_t *vals | ||
|
||
inline kh_uint64_t* kh_init_uint64() nogil | ||
inline void kh_destroy_uint64(kh_uint64_t*) nogil | ||
inline void kh_clear_uint64(kh_uint64_t*) nogil | ||
inline khint_t kh_get_uint64(kh_uint64_t*, int64_t) nogil | ||
inline void kh_resize_uint64(kh_uint64_t*, khint_t) nogil | ||
inline khint_t kh_put_uint64(kh_uint64_t*, int64_t, int*) nogil | ||
inline void kh_del_uint64(kh_uint64_t*, khint_t) nogil | ||
kh_uint64_t* kh_init_uint64() nogil | ||
void kh_destroy_uint64(kh_uint64_t*) nogil | ||
void kh_clear_uint64(kh_uint64_t*) nogil | ||
khint_t kh_get_uint64(kh_uint64_t*, int64_t) nogil | ||
void kh_resize_uint64(kh_uint64_t*, khint_t) nogil | ||
khint_t kh_put_uint64(kh_uint64_t*, int64_t, int*) nogil | ||
void kh_del_uint64(kh_uint64_t*, khint_t) nogil | ||
|
||
bint kh_exist_uint64(kh_uint64_t*, khiter_t) nogil | ||
|
||
|
@@ -95,13 +95,13 @@ cdef extern from "khash_python.h": | |
float64_t *keys | ||
size_t *vals | ||
|
||
inline kh_float64_t* kh_init_float64() nogil | ||
inline void kh_destroy_float64(kh_float64_t*) nogil | ||
inline void kh_clear_float64(kh_float64_t*) nogil | ||
inline khint_t kh_get_float64(kh_float64_t*, float64_t) nogil | ||
inline void kh_resize_float64(kh_float64_t*, khint_t) nogil | ||
inline khint_t kh_put_float64(kh_float64_t*, float64_t, int*) nogil | ||
inline void kh_del_float64(kh_float64_t*, khint_t) nogil | ||
kh_float64_t* kh_init_float64() nogil | ||
void kh_destroy_float64(kh_float64_t*) nogil | ||
void kh_clear_float64(kh_float64_t*) nogil | ||
khint_t kh_get_float64(kh_float64_t*, float64_t) nogil | ||
void kh_resize_float64(kh_float64_t*, khint_t) nogil | ||
khint_t kh_put_float64(kh_float64_t*, float64_t, int*) nogil | ||
void kh_del_float64(kh_float64_t*, khint_t) nogil | ||
|
||
bint kh_exist_float64(kh_float64_t*, khiter_t) nogil | ||
|
||
|
@@ -111,13 +111,13 @@ cdef extern from "khash_python.h": | |
int32_t *keys | ||
size_t *vals | ||
|
||
inline kh_int32_t* kh_init_int32() nogil | ||
inline void kh_destroy_int32(kh_int32_t*) nogil | ||
inline void kh_clear_int32(kh_int32_t*) nogil | ||
inline khint_t kh_get_int32(kh_int32_t*, int32_t) nogil | ||
inline void kh_resize_int32(kh_int32_t*, khint_t) nogil | ||
inline khint_t kh_put_int32(kh_int32_t*, int32_t, int*) nogil | ||
inline void kh_del_int32(kh_int32_t*, khint_t) nogil | ||
kh_int32_t* kh_init_int32() nogil | ||
void kh_destroy_int32(kh_int32_t*) nogil | ||
void kh_clear_int32(kh_int32_t*) nogil | ||
khint_t kh_get_int32(kh_int32_t*, int32_t) nogil | ||
void kh_resize_int32(kh_int32_t*, khint_t) nogil | ||
khint_t kh_put_int32(kh_int32_t*, int32_t, int*) nogil | ||
void kh_del_int32(kh_int32_t*, khint_t) nogil | ||
|
||
bint kh_exist_int32(kh_int32_t*, khiter_t) nogil | ||
|
||
|
@@ -129,12 +129,12 @@ cdef extern from "khash_python.h": | |
kh_cstr_t *keys | ||
PyObject **vals | ||
|
||
inline kh_strbox_t* kh_init_strbox() nogil | ||
inline void kh_destroy_strbox(kh_strbox_t*) nogil | ||
inline void kh_clear_strbox(kh_strbox_t*) nogil | ||
inline khint_t kh_get_strbox(kh_strbox_t*, kh_cstr_t) nogil | ||
inline void kh_resize_strbox(kh_strbox_t*, khint_t) nogil | ||
inline khint_t kh_put_strbox(kh_strbox_t*, kh_cstr_t, int*) nogil | ||
inline void kh_del_strbox(kh_strbox_t*, khint_t) nogil | ||
kh_strbox_t* kh_init_strbox() nogil | ||
void kh_destroy_strbox(kh_strbox_t*) nogil | ||
void kh_clear_strbox(kh_strbox_t*) nogil | ||
khint_t kh_get_strbox(kh_strbox_t*, kh_cstr_t) nogil | ||
void kh_resize_strbox(kh_strbox_t*, khint_t) nogil | ||
khint_t kh_put_strbox(kh_strbox_t*, kh_cstr_t, int*) nogil | ||
void kh_del_strbox(kh_strbox_t*, khint_t) nogil | ||
|
||
bint kh_exist_strbox(kh_strbox_t*, khiter_t) nogil |
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.
this prob should be implemented in the .pxd file; its called a lot
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.
If this is just a matter of cut/pasting from the pxi file, you got it.
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.
Is it correct that
_check_for_collisions
is only used inhashtable.pyx
itself? (or in the included template files)If so, I think we can just remove it here from the pxd file altogether (it is already defined as inline in hashtable itself)