Skip to content

Commit f014ada

Browse files
authored
MOD-10840 remove __ from namings (#35)
1 parent 780e4f4 commit f014ada

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/td_malloc.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
#ifndef TD_ALLOC_H
1616
#define TD_ALLOC_H
17-
#define __td_malloc malloc
18-
#define __td_calloc calloc
19-
#define __td_realloc realloc
20-
#define __td_free free
17+
#define td_malloc_ malloc
18+
#define td_calloc_ calloc
19+
#define td_realloc_ realloc
20+
#define td_free_ free
2121
#endif

src/tdigest.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,19 +162,19 @@ int td_init(double compression, td_histogram_t **result) {
162162
return 1;
163163
}
164164
td_histogram_t *histogram;
165-
histogram = (td_histogram_t *)__td_malloc(sizeof(td_histogram_t));
165+
histogram = (td_histogram_t *)td_malloc_(sizeof(td_histogram_t));
166166
if (!histogram) {
167167
return 1;
168168
}
169169
histogram->cap = capacity;
170170
histogram->compression = (double)compression;
171171
td_reset(histogram);
172-
histogram->nodes_mean = (double *)__td_calloc(capacity, sizeof(double));
172+
histogram->nodes_mean = (double *)td_calloc_(capacity, sizeof(double));
173173
if (!histogram->nodes_mean) {
174174
td_free(histogram);
175175
return 1;
176176
}
177-
histogram->nodes_weight = (long long *)__td_calloc(capacity, sizeof(long long));
177+
histogram->nodes_weight = (long long *)td_calloc_(capacity, sizeof(long long));
178178
if (!histogram->nodes_weight) {
179179
td_free(histogram);
180180
return 1;
@@ -192,12 +192,12 @@ td_histogram_t *td_new(double compression) {
192192

193193
void td_free(td_histogram_t *histogram) {
194194
if (histogram->nodes_mean) {
195-
__td_free((void *)(histogram->nodes_mean));
195+
td_free_((void *)(histogram->nodes_mean));
196196
}
197197
if (histogram->nodes_weight) {
198-
__td_free((void *)(histogram->nodes_weight));
198+
td_free_((void *)(histogram->nodes_weight));
199199
}
200-
__td_free((void *)(histogram));
200+
td_free_((void *)(histogram));
201201
}
202202

203203
int td_merge(td_histogram_t *into, td_histogram_t *from) {

0 commit comments

Comments
 (0)