1
0
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:
Alexander Medvednikov
2019-07-05 02:44:22 +02:00
parent 0f0ed8d716
commit d47e2f113f
8 changed files with 33 additions and 42 deletions

View File

@ -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();