Skip to content

Remove inline from khash_python #57618

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

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pandas/_libs/include/pandas/vendored/klib/khash_python.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ typedef struct {
} khcomplex128_t;

static const int KHASH_TRACE_DOMAIN = 424242;
static inline void *traced_malloc(size_t size) {
static void *traced_malloc(size_t size) {
void *ptr = malloc(size);
if (ptr != NULL) {
PyTraceMalloc_Track(KHASH_TRACE_DOMAIN, (uintptr_t)ptr, size);
}
return ptr;
}

static inline void *traced_calloc(size_t num, size_t size) {
static void *traced_calloc(size_t num, size_t size) {
void *ptr = calloc(num, size);
if (ptr != NULL) {
PyTraceMalloc_Track(KHASH_TRACE_DOMAIN, (uintptr_t)ptr, num * size);
}
return ptr;
}

static inline void *traced_realloc(void *old_ptr, size_t size) {
static void *traced_realloc(void *old_ptr, size_t size) {
void *ptr = realloc(old_ptr, size);
if (ptr != NULL) {
if (old_ptr != ptr) {
Expand All @@ -43,7 +43,7 @@ static inline void *traced_realloc(void *old_ptr, size_t size) {
return ptr;
}

static inline void traced_free(void *ptr) {
static void traced_free(void *ptr) {
if (ptr != NULL) {
PyTraceMalloc_Untrack(KHASH_TRACE_DOMAIN, (uintptr_t)ptr);
}
Expand Down