Author: glen Date: Mon Mar 28 12:22:12 2011 GMT Module: packages Tag: HEAD ---- Log message: - up to 7.3.146
---- Files affected: packages/vim: vim.spec (1.550 -> 1.551) , 7.3.144 (NONE -> 1.1) (NEW), 7.3.145 (NONE -> 1.1) (NEW), 7.3.146 (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: packages/vim/vim.spec diff -u packages/vim/vim.spec:1.550 packages/vim/vim.spec:1.551 --- packages/vim/vim.spec:1.550 Wed Mar 23 15:54:21 2011 +++ packages/vim/vim.spec Mon Mar 28 14:22:07 2011 @@ -26,7 +26,7 @@ # curl -s ftp://ftp.vim.org/pub/editors/vim/patches/7.3/MD5SUMS | grep -vF .gz | tail -n1 | awk '{print $2}' %define ver 7.3 -%define patchlevel 143 +%define patchlevel 146 %define rel 1 Summary: Vi IMproved - a Vi clone Summary(de.UTF-8): VIsual editor iMproved @@ -1395,6 +1395,9 @@ All persons listed below can be reached at <cvs_login>@pld-linux.org $Log$ +Revision 1.551 2011/03/28 12:22:07 glen +- up to 7.3.146 + Revision 1.550 2011/03/23 14:54:21 glen - up to 7.3.143 ================================================================ Index: packages/vim/7.3.144 diff -u /dev/null packages/vim/7.3.144:1.1 --- /dev/null Mon Mar 28 14:22:12 2011 +++ packages/vim/7.3.144 Mon Mar 28 14:22:06 2011 @@ -0,0 +1,80 @@ +To: [email protected] +Subject: Patch 7.3.144 +Fcc: outbox +From: Bram Moolenaar <[email protected]> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.144 +Problem: Crash with ":python help(dir)". (Kearn Holliday) +Solution: Fix the way the type is set on objects. (Tobias Columbus) +Files: src/if_python.c + + +*** ../vim-7.3.143/src/if_python.c 2010-11-16 19:25:56.000000000 +0100 +--- src/if_python.c 2011-03-26 13:54:22.000000000 +0100 +*************** +*** 780,786 **** + PythonIO_Init(void) + { + /* Fixups... */ +! OutputType.ob_type = &PyType_Type; + + return PythonIO_Init_io(); + } +--- 780,786 ---- + PythonIO_Init(void) + { + /* Fixups... */ +! PyType_Ready(&OutputType); + + return PythonIO_Init_io(); + } +*************** +*** 1402,1413 **** + static char *(argv[2]) = {"/must>not&exist/foo", NULL}; + + /* Fixups... */ +! BufferType.ob_type = &PyType_Type; +! RangeType.ob_type = &PyType_Type; +! WindowType.ob_type = &PyType_Type; +! BufListType.ob_type = &PyType_Type; +! WinListType.ob_type = &PyType_Type; +! CurrentType.ob_type = &PyType_Type; + + /* Set sys.argv[] to avoid a crash in warn(). */ + PySys_SetArgv(1, argv); +--- 1402,1413 ---- + static char *(argv[2]) = {"/must>not&exist/foo", NULL}; + + /* Fixups... */ +! PyType_Ready(&BufferType); +! PyType_Ready(&RangeType); +! PyType_Ready(&WindowType); +! PyType_Ready(&BufListType); +! PyType_Ready(&WinListType); +! PyType_Ready(&CurrentType); + + /* Set sys.argv[] to avoid a crash in warn(). */ + PySys_SetArgv(1, argv); +*** ../vim-7.3.143/src/version.c 2011-03-22 18:10:34.000000000 +0100 +--- src/version.c 2011-03-26 13:56:15.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 144, + /**/ + +-- +The chat program is in public domain. This is not the GNU public license. +If it breaks then you get to keep both pieces. + -- Copyright notice for the chat program + + /// Bram Moolenaar -- [email protected] -- 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 /// ================================================================ Index: packages/vim/7.3.145 diff -u /dev/null packages/vim/7.3.145:1.1 --- /dev/null Mon Mar 28 14:22:12 2011 +++ packages/vim/7.3.145 Mon Mar 28 14:22:06 2011 @@ -0,0 +1,64 @@ +To: [email protected] +Subject: Patch 7.3.145 +Fcc: outbox +From: Bram Moolenaar <[email protected]> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.145 (after 7.3.144) +Problem: Can't build with Python dynamically loading. +Solution: Add dll_PyType_Ready. +Files: src/if_python.c + + +*** ../vim-7.3.144/src/if_python.c 2011-03-26 13:56:41.000000000 +0100 +--- src/if_python.c 2011-03-26 18:10:00.000000000 +0100 +*************** +*** 165,170 **** +--- 165,171 ---- + # define PySys_SetObject dll_PySys_SetObject + # define PySys_SetArgv dll_PySys_SetArgv + # define PyType_Type (*dll_PyType_Type) ++ # define PyType_Ready (*dll_PyType_Ready) + # define Py_BuildValue dll_Py_BuildValue + # define Py_FindMethod dll_Py_FindMethod + # define Py_InitModule4 dll_Py_InitModule4 +*************** +*** 224,229 **** +--- 225,231 ---- + static int(*dll_PySys_SetObject)(char *, PyObject *); + static int(*dll_PySys_SetArgv)(int, char **); + static PyTypeObject* dll_PyType_Type; ++ static int (*dll_PyType_Ready)(PyTypeObject *type); + static PyObject*(*dll_Py_BuildValue)(char *, ...); + static PyObject*(*dll_Py_FindMethod)(struct PyMethodDef[], PyObject *, char *); + static PyObject*(*dll_Py_InitModule4)(char *, struct PyMethodDef *, char *, PyObject *, int); +*************** +*** 305,310 **** +--- 307,313 ---- + {"PySys_SetObject", (PYTHON_PROC*)&dll_PySys_SetObject}, + {"PySys_SetArgv", (PYTHON_PROC*)&dll_PySys_SetArgv}, + {"PyType_Type", (PYTHON_PROC*)&dll_PyType_Type}, ++ {"PyType_Ready", (PYTHON_PROC*)&dll_PyType_Ready}, + {"Py_BuildValue", (PYTHON_PROC*)&dll_Py_BuildValue}, + {"Py_FindMethod", (PYTHON_PROC*)&dll_Py_FindMethod}, + # if (PY_VERSION_HEX >= 0x02050000) && SIZEOF_SIZE_T != SIZEOF_INT +*** ../vim-7.3.144/src/version.c 2011-03-26 13:56:41.000000000 +0100 +--- src/version.c 2011-03-26 18:11:19.000000000 +0100 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 145, + /**/ + +-- +This message contains 78% recycled characters. + + /// Bram Moolenaar -- [email protected] -- 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 /// ================================================================ Index: packages/vim/7.3.146 diff -u /dev/null packages/vim/7.3.146:1.1 --- /dev/null Mon Mar 28 14:22:12 2011 +++ packages/vim/7.3.146 Mon Mar 28 14:22:07 2011 @@ -0,0 +1,224 @@ +To: [email protected] +Subject: Patch 7.3.146 +Fcc: outbox +From: Bram Moolenaar <[email protected]> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.146 +Problem: It's possible to assign to a read-only member of a dict. + It's possible to create a global variable "0". (ZyX) + It's possible to add a v: variable with ":let v:.name = 1". +Solution: Add check for dict item being read-only. + Check the name of g: variables. + Disallow adding v: variables. +Files: src/eval.c + + +*** ../vim-7.3.145/src/eval.c 2011-02-01 13:48:47.000000000 +0100 +--- src/eval.c 2011-03-27 15:56:44.000000000 +0200 +*************** +*** 789,794 **** +--- 789,796 ---- + static void set_var __ARGS((char_u *name, typval_T *varp, int copy)); + static int var_check_ro __ARGS((int flags, char_u *name)); + static int var_check_fixed __ARGS((int flags, char_u *name)); ++ static int var_check_func_name __ARGS((char_u *name, int new_var)); ++ static int valid_varname __ARGS((char_u *varname)); + static int tv_check_lock __ARGS((int lock, char_u *name)); + static int item_copy __ARGS((typval_T *from, typval_T *to, int deep, int copyID)); + static char_u *find_option_end __ARGS((char_u **arg, int *opt_flags)); +*************** +*** 2716,2723 **** +--- 2718,2744 ---- + lp->ll_list = NULL; + lp->ll_dict = lp->ll_tv->vval.v_dict; + lp->ll_di = dict_find(lp->ll_dict, key, len); ++ ++ /* When assigning to g: check that a function and variable name is ++ * valid. */ ++ if (rettv != NULL && lp->ll_dict == &globvardict) ++ { ++ if (rettv->v_type == VAR_FUNC ++ && var_check_func_name(key, lp->ll_di == NULL)) ++ return NULL; ++ if (!valid_varname(key)) ++ return NULL; ++ } ++ + if (lp->ll_di == NULL) + { ++ /* Can't add "v:" variable. */ ++ if (lp->ll_dict == &vimvardict) ++ { ++ EMSG2(_(e_illvar), name); ++ return NULL; ++ } ++ + /* Key does not exist in dict: may need to add it. */ + if (*p == '[' || *p == '.' || unlet) + { +*************** +*** 2737,2742 **** +--- 2758,2767 ---- + p = NULL; + break; + } ++ /* existing variable, need to check if it can be changed */ ++ else if (var_check_ro(lp->ll_di->di_flags, name)) ++ return NULL; ++ + if (len == -1) + clear_tv(&var1); + lp->ll_tv = &lp->ll_di->di_tv; +*************** +*** 19786,19792 **** + dictitem_T *v; + char_u *varname; + hashtab_T *ht; +- char_u *p; + + ht = find_var_ht(name, &varname); + if (ht == NULL || *varname == NUL) +--- 19811,19816 ---- +*************** +*** 19796,19820 **** + } + v = find_var_in_ht(ht, varname, TRUE); + +! if (tv->v_type == VAR_FUNC) +! { +! if (!(vim_strchr((char_u *)"wbs", name[0]) != NULL && name[1] == ':') +! && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':') +! ? name[2] : name[0])) +! { +! EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name); +! return; +! } +! /* Don't allow hiding a function. When "v" is not NULL we might be +! * assigning another function to the same var, the type is checked +! * below. */ +! if (v == NULL && function_exists(name)) +! { +! EMSG2(_("E705: Variable name conflicts with existing function: %s"), +! name); +! return; +! } +! } + + if (v != NULL) + { +--- 19820,19827 ---- + } + v = find_var_in_ht(ht, varname, TRUE); + +! if (tv->v_type == VAR_FUNC && var_check_func_name(name, v == NULL)) +! return; + + if (v != NULL) + { +*************** +*** 19880,19892 **** + } + + /* Make sure the variable name is valid. */ +! for (p = varname; *p != NUL; ++p) +! if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p)) +! && *p != AUTOLOAD_CHAR) +! { +! EMSG2(_(e_illvar), varname); +! return; +! } + + v = (dictitem_T *)alloc((unsigned)(sizeof(dictitem_T) + + STRLEN(varname))); +--- 19887,19894 ---- + } + + /* Make sure the variable name is valid. */ +! if (!valid_varname(varname)) +! return; + + v = (dictitem_T *)alloc((unsigned)(sizeof(dictitem_T) + + STRLEN(varname))); +*************** +*** 19951,19956 **** +--- 19953,20007 ---- + } + + /* ++ * Check if a funcref is assigned to a valid variable name. ++ * Return TRUE and give an error if not. ++ */ ++ static int ++ var_check_func_name(name, new_var) ++ char_u *name; /* points to start of variable name */ ++ int new_var; /* TRUE when creating the variable */ ++ { ++ if (!(vim_strchr((char_u *)"wbs", name[0]) != NULL && name[1] == ':') ++ && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':') ++ ? name[2] : name[0])) ++ { ++ EMSG2(_("E704: Funcref variable name must start with a capital: %s"), ++ name); ++ return TRUE; ++ } ++ /* Don't allow hiding a function. When "v" is not NULL we might be ++ * assigning another function to the same var, the type is checked ++ * below. */ ++ if (new_var && function_exists(name)) ++ { ++ EMSG2(_("E705: Variable name conflicts with existing function: %s"), ++ name); ++ return TRUE; ++ } ++ return FALSE; ++ } ++ ++ /* ++ * Check if a variable name is valid. ++ * Return FALSE and give an error if not. ++ */ ++ static int ++ valid_varname(varname) ++ char_u *varname; ++ { ++ char_u *p; ++ ++ for (p = varname; *p != NUL; ++p) ++ if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p)) ++ && *p != AUTOLOAD_CHAR) ++ { ++ EMSG2(_(e_illvar), varname); ++ return FALSE; ++ } ++ return TRUE; ++ } ++ ++ /* + * Return TRUE if typeval "tv" is set to be locked (immutable). + * Also give an error message, using "name". + */ +*** ../vim-7.3.145/src/version.c 2011-03-26 18:32:00.000000000 +0100 +--- src/version.c 2011-03-27 16:01:03.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 146, + /**/ + +-- +ARTHUR: It is I, Arthur, son of Uther Pendragon, from the castle of Camelot. + King of all Britons, defeator of the Saxons, sovereign of all England! + [Pause] +SOLDIER: Get away! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- [email protected] -- 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 /// ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/vim/vim.spec?r1=1.550&r2=1.551&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
