mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
Revert "make function arguments immutable"
This reverts commit 0f0ed8d716
.
This commit is contained in:
@ -115,8 +115,8 @@ fn is_js_prim(typ string) bool {
|
||||
typ == 'i8' || typ == 'i16' || typ == 'i32' || typ == 'i64'
|
||||
}
|
||||
|
||||
fn (p mut Parser) decode_array(_typ string) string {
|
||||
typ := _typ.replace('array_', '')
|
||||
fn (p mut Parser) decode_array(typ string) string {
|
||||
typ = typ.replace('array_', '')
|
||||
t := p.table.find_type(typ)
|
||||
fn_name := js_dec_name(typ)
|
||||
// If we have `[]Profile`, have to register a Profile en(de)coder first
|
||||
@ -149,8 +149,8 @@ fn js_dec_name(typ string) string {
|
||||
return name
|
||||
}
|
||||
|
||||
fn (p &Parser) encode_array(_typ string) string {
|
||||
typ := _typ.replace('array_', '')
|
||||
fn (p &Parser) encode_array(typ string) string {
|
||||
typ = typ.replace('array_', '')
|
||||
fn_name := js_enc_name(typ)
|
||||
return '
|
||||
o = cJSON_CreateArray();
|
||||
|
Reference in New Issue
Block a user