1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: definitions + other fixes; calloc fix

This commit is contained in:
Alexander Medvednikov
2020-03-04 17:08:28 +01:00
parent 37453945d0
commit f27f832ede
13 changed files with 370 additions and 31 deletions

View File

@@ -289,7 +289,7 @@ var map_int = function() {}
//#include <inttypes.h> // int64_t etc
//#include <stdint.h> // int64_t etc
//================================== TYPEDEFS ================================*/
//================================== 1TYPEDEFS ================================*/
typedef int64_t i64;
typedef int16_t i16;

View File

@@ -164,7 +164,9 @@ const (
c_reserved = ['delete', 'exit', 'unix',
// 'print',
// 'ok',
'error', 'malloc', 'calloc', 'free', 'panic',
'error', 'malloc',
//'calloc',
'free', 'panic',
// Full list of C reserved words, from: https://en.cppreference.com/w/c/keyword
'auto', 'char', 'default', 'do', 'double', 'extern', 'float', 'inline', 'int', 'long', 'register', 'restrict', 'short', 'signed', 'sizeof', 'static', 'switch', 'typedef', 'union', 'unsigned', 'void', 'volatile', 'while', ]
)