Skip to content

Commit a755a64

Browse files
authored
Merge pull request #7 from StuartApp/missing_review_change
Missing review suggestion.
2 parents 9cfac15 + 46968ef commit a755a64

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ext/h3/h3.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#include <h3/h3api.h>
33
#include <stdio.h>
44

5+
#define H3_TO_STR_BUF_SIZE 32
6+
57
static GeoCoord to_geocoord(VALUE coords);
68

79
static VALUE h3_maxKringSize(VALUE mod, VALUE k) {
@@ -107,8 +109,8 @@ static VALUE h3_stringToH3(VALUE mod, VALUE str) {
107109
}
108110

109111
static VALUE h3_h3ToString(VALUE mod, VALUE h) {
110-
size_t sz = 32;
111-
char str[32];
112+
size_t sz = H3_TO_STR_BUF_SIZE;
113+
char str[H3_TO_STR_BUF_SIZE];
112114
h3ToString(NUM2LONG(h), str, sz);
113115
return rb_str_new_cstr(str);
114116
}

0 commit comments

Comments
 (0)