backporting: remove C typedef redefinitions of map_int/map_string/array_byte/array_string

pull/6585/head
Delyan Angelov 2020-10-07 11:32:50 +03:00
parent 317a9bae5f
commit d46d607334
2 changed files with 4 additions and 6 deletions

View File

@ -84,7 +84,6 @@ pub fn common_parse_uint2(s string, _base int, _bit_size int) (u64, int) {
// Use compile-time constants for common cases. // Use compile-time constants for common cases.
cutoff := max_u64 / u64(base) + u64(1) cutoff := max_u64 / u64(base) + u64(1)
max_val := if bit_size == 64 { max_u64 } else { (u64(1)<<u64(bit_size)) - u64(1) } max_val := if bit_size == 64 { max_u64 } else { (u64(1)<<u64(bit_size)) - u64(1) }
mut underscores := false
mut n := u64(0) mut n := u64(0)
for i in start_index .. s.len { for i in start_index .. s.len {
c := s[i] c := s[i]
@ -92,7 +91,6 @@ pub fn common_parse_uint2(s string, _base int, _bit_size int) (u64, int) {
mut d := byte(0) mut d := byte(0)
if c == `_` && base0 { if c == `_` && base0 {
// underscore_ok already called // underscore_ok already called
underscores = true
continue continue
} }
else if `0` <= c && c <= `9` { else if `0` <= c && c <= `9` {

View File

@ -433,16 +433,16 @@ typedef void* voidptr;
typedef char* charptr; typedef char* charptr;
typedef struct array array; typedef struct array array;
typedef struct map map; typedef struct map map;
typedef array array_string;
typedef array array_int; typedef array array_int;
typedef array array_byte;
typedef array array_f32; typedef array array_f32;
typedef array array_f64; typedef array array_f64;
typedef array array_u16; typedef array array_u16;
typedef array array_u32; typedef array array_u32;
typedef array array_u64; typedef array array_u64;
typedef map map_int; //typedef map map_int;
typedef map map_string; //typedef map map_string;
//typedef array array_string;
//typedef array array_byte;
typedef byte array_fixed_byte_300 [300]; typedef byte array_fixed_byte_300 [300];
typedef byte array_fixed_byte_400 [400]; typedef byte array_fixed_byte_400 [400];