From 009d84a34f3678ec93921bee3bc05be2fd606264 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 28 Jan 2016 14:12:00 +0100 Subject: [PATCH 1/3] patch 7.4.1188 Problem: Using older JSON standard. Solution: Update the link. Adjust the text a bit. --- runtime/doc/eval.txt | 30 +++++++++++++----------------- src/json.c | 2 +- src/version.c | 2 ++ 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 294f2670cc..42503197dc 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.4. Last change: 2016 Jan 24 +*eval.txt* For Vim version 7.4. Last change: 2016 Jan 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2842,6 +2842,7 @@ empty({expr}) *empty()* Return the Number 1 if {expr} is empty, zero otherwise. A |List| or |Dictionary| is empty when it does not have any items. A Number is empty when its value is zero. + |v:false|, |v:none| and |v:null| are empty, |v:true| is not. For a long |List| this is much faster than comparing the length with zero. @@ -4252,16 +4253,21 @@ jsondecode({string}) *jsondecode()* JSON and Vim values. The decoding is permissive: - A trailing comma in an array and object is ignored. - - An empty item in an array results in v:none. - - When an object name is not a string it is converted to a - string. E.g. the number 123 is used as the string "123". + - An empty item in an array, two commas with nothing or white + space in between, results in v:none. + - When an object member name is not a string it is converted + to a string. E.g. the number 123 is used as the string + "123". - More floating point numbers are recognized, e.g. "1." for "1.0". + The result must be a valid Vim type: + - An empty object member name is not allowed. + - Duplicate object member names are not allowed. jsonencode({expr}) *jsonencode()* Encode {expr} as JSON and return this as a string. The encoding is specified in: - http://www.ietf.org/rfc/rfc4627.txt + https://tools.ietf.org/html/rfc7159.html Vim values are converted as follows: Number decimal number Float floating point number @@ -5889,18 +5895,8 @@ shellescape({string} [, {special}]) *shellescape()* shiftwidth() *shiftwidth()* Returns the effective value of 'shiftwidth'. This is the 'shiftwidth' value unless it is zero, in which case it is the - 'tabstop' value. To be backwards compatible in indent - plugins, use this: > - if exists('*shiftwidth') - func s:sw() - return shiftwidth() - endfunc - else - func s:sw() - return &sw - endfunc - endif -< And then use s:sw() instead of &sw. + 'tabstop' value. This function was introduced with patch + 7.3.694 in 2012, everybody should have it by now. simplify({filename}) *simplify()* diff --git a/src/json.c b/src/json.c index da8beea874..d6507c3517 100644 --- a/src/json.c +++ b/src/json.c @@ -10,7 +10,7 @@ /* * json.c: Encoding and decoding JSON. * - * Follows this standard: http://www.ietf.org/rfc/rfc4627.txt + * Follows this standard: https://tools.ietf.org/html/rfc7159.html */ #include "vim.h" diff --git a/src/version.c b/src/version.c index 5a8a39c3c6..3fc0a7221e 100644 --- a/src/version.c +++ b/src/version.c @@ -746,6 +746,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1188, /**/ 1187, /**/ From 923e43b837ca4c8edb7998743f142823eaeaf588 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 28 Jan 2016 15:07:38 +0100 Subject: [PATCH 2/3] patch 7.4.1189 Problem: Using another language on MS-Windows does not work. (Yongwei Wu) Solution: Undo the change to try loading libintl-8.dll first. --- src/os_win32.c | 3 +-- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/os_win32.c b/src/os_win32.c index 4c876a05ce..be7bd95b58 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -500,12 +500,11 @@ dyn_libintl_init() if (hLibintlDLL) return 1; /* Load gettext library (libintl.dll) */ + hLibintlDLL = vimLoadLib(GETTEXT_DLL); #ifdef GETTEXT_DLL_ALT if (!hLibintlDLL) hLibintlDLL = vimLoadLib(GETTEXT_DLL_ALT); #endif - if (!hLibintlDLL) - hLibintlDLL = vimLoadLib(GETTEXT_DLL); if (!hLibintlDLL) { if (p_verbose > 0) diff --git a/src/version.c b/src/version.c index 3fc0a7221e..338cb7a9a1 100644 --- a/src/version.c +++ b/src/version.c @@ -746,6 +746,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1189, /**/ 1188, /**/ From ba59ddbd3642d02614acbe52694e3e8a78c0e9d3 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 28 Jan 2016 15:34:25 +0100 Subject: [PATCH 3/3] patch 7.4.1190 Problem: On OSX the default flag for dlopen() is different. Solution: Add RTLD_LOCAL in the configure check. (sv99, closes #604) --- src/auto/configure | 18 ++++++++++++------ src/configure.in | 8 ++++---- src/version.c | 2 ++ 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/auto/configure b/src/auto/configure index dfe46cae05..8dfecaf285 100755 --- a/src/auto/configure +++ b/src/auto/configure @@ -5991,7 +5991,9 @@ eof fi - if ${vi_cv_dll_name_python+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's dll name" >&5 +$as_echo_n "checking Python's dll name... " >&6; } +if ${vi_cv_dll_name_python+:} false; then : $as_echo_n "(cached) " >&6 else @@ -6002,7 +6004,8 @@ else fi fi - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python" >&5 +$as_echo "$vi_cv_dll_name_python" >&6; } PYTHON_LIBS="${vi_cv_path_python_plibs}" if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then @@ -6320,7 +6323,9 @@ eof fi - if ${vi_cv_dll_name_python3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python3's dll name" >&5 +$as_echo_n "checking Python3's dll name... " >&6; } +if ${vi_cv_dll_name_python3+:} false; then : $as_echo_n "(cached) " >&6 else @@ -6331,7 +6336,8 @@ else fi fi - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python3" >&5 +$as_echo "$vi_cv_dll_name_python3" >&6; } PYTHON3_LIBS="${vi_cv_path_python3_plibs}" if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then @@ -6473,7 +6479,7 @@ else int no_rtl_global_needed_for(char *python_instsoname, char *prefix) { int needed = 0; - void* pylib = dlopen(python_instsoname, RTLD_LAZY); + void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL); if (pylib != 0) { void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome"); @@ -6539,7 +6545,7 @@ else int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix) { int needed = 0; - void* pylib = dlopen(python_instsoname, RTLD_LAZY); + void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL); if (pylib != 0) { void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome"); diff --git a/src/configure.in b/src/configure.in index e9ffa7bb19..ffa0b2ded1 100644 --- a/src/configure.in +++ b/src/configure.in @@ -1219,7 +1219,7 @@ eof vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//` fi ]) - AC_CACHE_VAL(vi_cv_dll_name_python, + AC_CACHE_CHECK(Python's dll name,vi_cv_dll_name_python, [ if test "X$python_DLLLIBRARY" != "X"; then vi_cv_dll_name_python="$python_DLLLIBRARY" @@ -1428,7 +1428,7 @@ eof vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//` vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//` ]) - AC_CACHE_VAL(vi_cv_dll_name_python3, + AC_CACHE_CHECK(Python3's dll name,vi_cv_dll_name_python3, [ if test "X$python3_DLLLIBRARY" != "X"; then vi_cv_dll_name_python3="$python3_DLLLIBRARY" @@ -1540,7 +1540,7 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then int no_rtl_global_needed_for(char *python_instsoname, char *prefix) { int needed = 0; - void* pylib = dlopen(python_instsoname, RTLD_LAZY); + void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL); if (pylib != 0) { void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome"); @@ -1586,7 +1586,7 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix) { int needed = 0; - void* pylib = dlopen(python_instsoname, RTLD_LAZY); + void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL); if (pylib != 0) { void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome"); diff --git a/src/version.c b/src/version.c index 338cb7a9a1..287bc93f91 100644 --- a/src/version.c +++ b/src/version.c @@ -746,6 +746,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1190, /**/ 1189, /**/