v2: fix version
parent
d57b1ca962
commit
12b8dc2613
|
@ -98,7 +98,7 @@ pub fn cgen(files []ast.File, table &table.Table, pref &pref.Preferences) string
|
|||
if g.is_test {
|
||||
g.write_tests_main()
|
||||
}
|
||||
return g.typedefs.str() + g.definitions.str() + g.out.str()
|
||||
return c_commit_hash_default + g.typedefs.str() + g.definitions.str() + g.out.str()
|
||||
}
|
||||
|
||||
pub fn (g mut Gen) init() {
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
module gen
|
||||
|
||||
const (
|
||||
c_common_macros = '
|
||||
c_commit_hash_default = '
|
||||
#ifndef V_COMMIT_HASH
|
||||
#define V_COMMIT_HASH "$vhash()"
|
||||
#endif
|
||||
|
||||
'
|
||||
c_common_macros = '
|
||||
#define EMPTY_STRUCT_DECLARATION
|
||||
#define EMPTY_STRUCT_INITIALIZATION 0
|
||||
// Due to a tcc bug, the length of an array needs to be specified, but GCC crashes if it is...
|
||||
|
@ -40,8 +45,6 @@ const (
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#define V_COMMIT_HASH "TODO"
|
||||
|
||||
'
|
||||
c_headers = '
|
||||
|
||||
|
|
Loading…
Reference in New Issue