Просмотр исходного кода

Split nil and null encode statements

pull/68/head
Stanislav Vishnevskiy 10 лет назад
Родитель
Сommit
09e6de5cb7
1 измененных файлов: 7 добавлений и 3 удалений
  1. +7
    -3
      c_src/encoder.c

+ 7
- 3
c_src/encoder.c Просмотреть файл

@ -712,12 +712,16 @@ encode_iter(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
stack = enif_make_list_cell(env, curr, stack);
stack = enif_make_list_cell(env, e->atoms->ref_array, stack);
stack = enif_make_list_cell(env, item, stack);
} else if(enif_compare(curr, e->atoms->atom_null) == 0
|| (e->use_nil && enif_compare(curr, e->atoms->atom_nil) == 0)) {
} else if(e->use_nil && enif_compare(curr, e->atoms->atom_nil) == 0)) {
if(!enc_literal(e, "null", 4)) {
ret = enc_error(e, "null");
goto done;
}
}
} else if(enif_compare(curr, e->atoms->atom_null) == 0 {
if(!enc_literal(e, "null", 4)) {
ret = enc_error(e, "null");
goto done;
}
} else if(enif_compare(curr, e->atoms->atom_true) == 0) {
if(!enc_literal(e, "true", 4)) {
ret = enc_error(e, "true");

Загрузка…
Отмена
Сохранить