mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v2: fix version
This commit is contained in:
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 {
|
if g.is_test {
|
||||||
g.write_tests_main()
|
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() {
|
pub fn (g mut Gen) init() {
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
module gen
|
module gen
|
||||||
|
|
||||||
const (
|
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_DECLARATION
|
||||||
#define EMPTY_STRUCT_INITIALIZATION 0
|
#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...
|
// 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
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define V_COMMIT_HASH "TODO"
|
|
||||||
|
|
||||||
'
|
'
|
||||||
c_headers = '
|
c_headers = '
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user