| To: vim_dev@googlegroups.com |
| Subject: Patch 7.3.689 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.3.689 |
| Problem: MzScheme and Lua may use a NULL string. |
| Solution: Use an empty string instead of NULL. (Yukihiro Nakadaira) |
| Files: src/if_lua.c, src/if_mzsch.c |
| |
| |
| |
| |
| |
| *** 464,470 **** |
| switch (tv->v_type) |
| { |
| case VAR_STRING: |
| ! lua_pushstring(L, (char *) tv->vval.v_string); |
| break; |
| case VAR_NUMBER: |
| lua_pushinteger(L, (int) tv->vval.v_number); |
| --- 464,471 ---- |
| switch (tv->v_type) |
| { |
| case VAR_STRING: |
| ! lua_pushstring(L, tv->vval.v_string == NULL |
| ! ? "" : (char *)tv->vval.v_string); |
| break; |
| case VAR_NUMBER: |
| lua_pushinteger(L, (int) tv->vval.v_number); |
| |
| |
| |
| *** 2649,2655 **** |
| new_value = FALSE; |
| else if (vim_value->v_type == VAR_STRING) |
| { |
| ! result = scheme_make_string((char *)vim_value->vval.v_string); |
| MZ_GC_CHECK(); |
| } |
| else if (vim_value->v_type == VAR_NUMBER) |
| --- 2649,2656 ---- |
| new_value = FALSE; |
| else if (vim_value->v_type == VAR_STRING) |
| { |
| ! result = scheme_make_string(vim_value->vval.v_string == NULL |
| ! ? "" : (char *)vim_value->vval.v_string); |
| MZ_GC_CHECK(); |
| } |
| else if (vim_value->v_type == VAR_NUMBER) |
| |
| |
| |
| *** 721,722 **** |
| --- 721,724 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 689, |
| /**/ |
| |
| -- |
| Computers make very fast, very accurate, mistakes. |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ an exciting new programming language -- http://www.Zimbu.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |