mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
[if vfmt] for fgen() functions
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
module builtin
|
||||
|
||||
struct Option {
|
||||
data [255]byte
|
||||
data [300]byte
|
||||
error string
|
||||
ecode int
|
||||
ok bool
|
||||
@ -14,8 +14,8 @@ struct Option {
|
||||
|
||||
// `fn foo() ?Foo { return foo }` => `fn foo() ?Foo { return opt_ok(foo); }`
|
||||
fn opt_ok(data voidptr, size int) Option {
|
||||
if size >= 255 {
|
||||
panic('option size too big: $size (max is 255), this is a temporary limit')
|
||||
if size >= 300 {
|
||||
panic('option size too big: $size (max is 300), this is a temporary limit')
|
||||
}
|
||||
res := Option {
|
||||
ok: true
|
||||
|
Reference in New Issue
Block a user