mirror of
https://github.com/tailix/libkernaux.git
synced 2025-02-17 15:45:32 -05:00
Rename const "KERNAUX_ITOA_BUFFER_SIZE" to "KERNAUX_ITOA10_BUFFER_SIZE"
This commit is contained in:
parent
56bc38461b
commit
81f89a65b1
4 changed files with 6 additions and 4 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
* include/kernaux/assert.h: Require semicolon after macros
|
||||
* include/kernaux/libc.h: Add funcs "atoi", "isdigit", "isspace"
|
||||
* include/kernaux/ntoa.h: Rename const "KERNAUX_ITOA_BUFFER_SIZE" to
|
||||
"KERNAUX_ITOA10_BUFFER_SIZE"
|
||||
|
||||
2022-01-22 Alex Kotov <kotovalexarian@gmail.com>
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ extern "C" {
|
|||
|
||||
// uint64_t: "18446744073709551615"
|
||||
// int64_t: "-9223372036854775808"
|
||||
#define KERNAUX_ITOA_BUFFER_SIZE 21
|
||||
#define KERNAUX_ITOA10_BUFFER_SIZE 21
|
||||
|
||||
void kernaux_utoa10(uint64_t value, char *buffer);
|
||||
void kernaux_itoa10(int64_t value, char *buffer);
|
||||
|
|
|
@ -35,7 +35,7 @@ VALUE rb_KernAux_utoa10(
|
|||
if (rb_funcall(number_rb, rb_intern_LESS, 1, INT2FIX(0))) {
|
||||
rb_raise(rb_eRangeError, "can't convert negative number to uint64_t");
|
||||
}
|
||||
char buffer[KERNAUX_ITOA_BUFFER_SIZE];
|
||||
char buffer[KERNAUX_ITOA10_BUFFER_SIZE];
|
||||
kernaux_utoa10(NUM2ULL(number_rb), buffer);
|
||||
return rb_funcall(rb_str_new2(buffer), rb_intern_freeze, 0);
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ VALUE rb_KernAux_itoa10(
|
|||
const VALUE number_rb
|
||||
) {
|
||||
RB_INTEGER_TYPE_P(number_rb);
|
||||
char buffer[KERNAUX_ITOA_BUFFER_SIZE];
|
||||
char buffer[KERNAUX_ITOA10_BUFFER_SIZE];
|
||||
kernaux_itoa10(NUM2LL(number_rb), buffer);
|
||||
return rb_funcall(rb_str_new2(buffer), rb_intern_freeze, 0);
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ static const struct {
|
|||
|
||||
int main()
|
||||
{
|
||||
char buffer[KERNAUX_ITOA_BUFFER_SIZE];
|
||||
char buffer[KERNAUX_ITOA10_BUFFER_SIZE];
|
||||
|
||||
for (
|
||||
size_t index = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue