changeset 3865:3c072c1cb873 v7.3.689

updated for version 7.3.689 Problem: MzScheme and Lua may use a NULL string. Solution: Use an empty string instead of NULL. (Yukihiro Nakadaira)
author Bram Moolenaar <bram@vim.org>
date Sun, 14 Oct 2012 03:41:59 +0200
parents 819808a9b5eb
children 7c95e59d681d
files src/if_lua.c src/if_mzsch.c src/version.c
diffstat 3 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/if_lua.c
+++ b/src/if_lua.c
@@ -464,7 +464,8 @@ luaV_pushtypval(lua_State *L, typval_T *
     switch (tv->v_type)
     {
 	case VAR_STRING:
-	    lua_pushstring(L, (char *) tv->vval.v_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);
--- a/src/if_mzsch.c
+++ b/src/if_mzsch.c
@@ -2649,7 +2649,8 @@ vim_to_mzscheme(typval_T *vim_value, int
 	new_value = FALSE;
     else if (vim_value->v_type == VAR_STRING)
     {
-	result = scheme_make_string((char *)vim_value->vval.v_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)
--- a/src/version.c
+++ b/src/version.c
@@ -720,6 +720,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    689,
+/**/
     688,
 /**/
     687,