changelog for the upcoming V 0.1.19
parent
f61b14584a
commit
6c6cbe0821
21
CHANGELOG.md
21
CHANGELOG.md
|
@ -1,3 +1,24 @@
|
|||
## V 0.1.19
|
||||
*XX Aug 2019*
|
||||
|
||||
- New `mysql` module.
|
||||
- Better error format that is supported by all major editors (go to error).
|
||||
- Raw json fields via the `[raw]` attribute.
|
||||
- `import const` was removed from the language.
|
||||
- All C code was removed from the `freetype` module.
|
||||
- `[typedef] attribute for imported C struct typedefs.
|
||||
- Support of Objective C interfaces (primarily for using Cocoa).
|
||||
- REPL: clear command and custom functions.
|
||||
- Syntax bug fixed: `foo[0] += 10` is now possible.
|
||||
- http: support plain HTTP protocol and follow redirects.
|
||||
- net: basic UDP support.
|
||||
- Functions can now be inlined via the `[inline]` attribute.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## V 0.1.18
|
||||
*16 Aug 2019*
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ CommonCHeaders = '
|
|||
|
||||
#define STRUCT_DEFAULT_VALUE {}
|
||||
#define EMPTY_STRUCT_DECLARATION
|
||||
#define EMPTY_STRUCT_INIT 0
|
||||
#define OPTION_CAST(x) (x)
|
||||
|
||||
#ifdef _WIN32
|
||||
|
@ -36,8 +35,6 @@ CommonCHeaders = '
|
|||
#define STRUCT_DEFAULT_VALUE {0}
|
||||
#undef EMPTY_STRUCT_DECLARATION
|
||||
#define EMPTY_STRUCT_DECLARATION void *____dummy_variable;
|
||||
#undef EMPTY_STRUCT_INIT
|
||||
#define EMPTY_STRUCT_INIT 0
|
||||
#undef OPTION_CAST
|
||||
#define OPTION_CAST(x)
|
||||
#endif
|
||||
|
|
|
@ -2774,10 +2774,10 @@ fn (p mut Parser) array_init() string {
|
|||
}
|
||||
p.gen(' })')
|
||||
// p.gen('$new_arr($vals.len, $vals.len, sizeof($typ), ($typ[]) $c_arr );')
|
||||
// TODO why need !first_pass()?? Otherwise it goes to the very top of the out.c file
|
||||
// Need to do this in the second pass, otherwise it goes to the very top of the out.c file
|
||||
if !p.first_pass() {
|
||||
if i == 0 {
|
||||
p.cgen.set_placeholder(new_arr_ph, '$new_arr($i, $i, sizeof($typ), ($typ[]) {EMPTY_STRUCT_INIT ')
|
||||
p.cgen.set_placeholder(new_arr_ph, '$new_arr($i, $i, sizeof($typ), ($typ[]) { 0 ')
|
||||
} else {
|
||||
p.cgen.set_placeholder(new_arr_ph, '$new_arr($i, $i, sizeof($typ), ($typ[]) { ')
|
||||
}
|
||||
|
@ -2926,11 +2926,9 @@ fn (p mut Parser) struct_init(typ string, is_c_struct_init bool) string {
|
|||
}
|
||||
did_gen_something = true
|
||||
}
|
||||
|
||||
if !did_gen_something {
|
||||
p.gen('EMPTY_STRUCT_INIT')
|
||||
p.gen('0')
|
||||
}
|
||||
|
||||
p.gen('}')
|
||||
if ptr {
|
||||
p.gen(')')
|
||||
|
|
Loading…
Reference in New Issue