summaryrefslogtreecommitdiffstats
path: root/source/ap/vim/patches/7.2.084
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2009-08-26 10:00:38 -0500
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:41:17 +0200
commit5a12e7c134274dba706667107d10d231517d3e05 (patch)
tree55718d5acb710fde798d9f38d0bbaf594ed4b296 /source/ap/vim/patches/7.2.084
downloadcurrent-5a12e7c134274dba706667107d10d231517d3e05.tar.gz
current-5a12e7c134274dba706667107d10d231517d3e05.tar.xz
Slackware 13.0slackware-13.0
Wed Aug 26 10:00:38 CDT 2009 Slackware 13.0 x86_64 is released as stable! Thanks to everyone who helped make this release possible -- see the RELEASE_NOTES for the credits. The ISOs are off to the replicator. This time it will be a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We're taking pre-orders now at store.slackware.com. Please consider picking up a copy to help support the project. Once again, thanks to the entire Slackware community for all the help testing and fixing things and offering suggestions during this development cycle. As always, have fun and enjoy! -P.
Diffstat (limited to 'source/ap/vim/patches/7.2.084')
-rw-r--r--source/ap/vim/patches/7.2.084144
1 files changed, 144 insertions, 0 deletions
diff --git a/source/ap/vim/patches/7.2.084 b/source/ap/vim/patches/7.2.084
new file mode 100644
index 000000000..4c912ca7a
--- /dev/null
+++ b/source/ap/vim/patches/7.2.084
@@ -0,0 +1,144 @@
+To: vim-dev@vim.org
+Subject: Patch 7.2.084
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.2.084
+Problem: Recursive structures are not handled properly in Python
+ vim.eval().
+Solution: Keep track of references in a better way. (Yukihiro Nakadaira)
+Files: src/if_python.c
+
+
+*** ../vim-7.2.083/src/if_python.c Thu Nov 20 11:04:01 2008
+--- src/if_python.c Tue Jan 13 18:08:06 2009
+***************
+*** 1151,1164 ****
+
+ /* Check if we run into a recursive loop. The item must be in lookupDict
+ * then and we can use it again. */
+! sprintf(ptrBuf, PRINTF_DECIMAL_LONG_U, (long_u)our_tv);
+! result = PyDict_GetItemString(lookupDict, ptrBuf);
+! if (result != NULL)
+! Py_INCREF(result);
+! else if (our_tv->v_type == VAR_STRING)
+ {
+ result = Py_BuildValue("s", our_tv->vval.v_string);
+- PyDict_SetItemString(lookupDict, ptrBuf, result);
+ }
+ else if (our_tv->v_type == VAR_NUMBER)
+ {
+--- 1151,1173 ----
+
+ /* Check if we run into a recursive loop. The item must be in lookupDict
+ * then and we can use it again. */
+! if ((our_tv->v_type == VAR_LIST && our_tv->vval.v_list != NULL)
+! || (our_tv->v_type == VAR_DICT && our_tv->vval.v_dict != NULL))
+! {
+! sprintf(ptrBuf, PRINTF_DECIMAL_LONG_U,
+! our_tv->v_type == VAR_LIST ? (long_u)our_tv->vval.v_list
+! : (long_u)our_tv->vval.v_dict);
+! result = PyDict_GetItemString(lookupDict, ptrBuf);
+! if (result != NULL)
+! {
+! Py_INCREF(result);
+! return result;
+! }
+! }
+!
+! if (our_tv->v_type == VAR_STRING)
+ {
+ result = Py_BuildValue("s", our_tv->vval.v_string);
+ }
+ else if (our_tv->v_type == VAR_NUMBER)
+ {
+***************
+*** 1167,1173 ****
+ /* For backwards compatibility numbers are stored as strings. */
+ sprintf(buf, "%ld", (long)our_tv->vval.v_number);
+ result = Py_BuildValue("s", buf);
+- PyDict_SetItemString(lookupDict, ptrBuf, result);
+ }
+ # ifdef FEAT_FLOAT
+ else if (our_tv->v_type == VAR_FLOAT)
+--- 1176,1181 ----
+***************
+*** 1176,1182 ****
+
+ sprintf(buf, "%f", our_tv->vval.v_float);
+ result = Py_BuildValue("s", buf);
+- PyDict_SetItemString(lookupDict, ptrBuf, result);
+ }
+ # endif
+ else if (our_tv->v_type == VAR_LIST)
+--- 1184,1189 ----
+***************
+*** 1185,1194 ****
+ listitem_T *curr;
+
+ result = PyList_New(0);
+- PyDict_SetItemString(lookupDict, ptrBuf, result);
+
+ if (list != NULL)
+ {
+ for (curr = list->lv_first; curr != NULL; curr = curr->li_next)
+ {
+ newObj = VimToPython(&curr->li_tv, depth + 1, lookupDict);
+--- 1192,1202 ----
+ listitem_T *curr;
+
+ result = PyList_New(0);
+
+ if (list != NULL)
+ {
++ PyDict_SetItemString(lookupDict, ptrBuf, result);
++
+ for (curr = list->lv_first; curr != NULL; curr = curr->li_next)
+ {
+ newObj = VimToPython(&curr->li_tv, depth + 1, lookupDict);
+***************
+*** 1200,1206 ****
+ else if (our_tv->v_type == VAR_DICT)
+ {
+ result = PyDict_New();
+- PyDict_SetItemString(lookupDict, ptrBuf, result);
+
+ if (our_tv->vval.v_dict != NULL)
+ {
+--- 1208,1213 ----
+***************
+*** 1209,1214 ****
+--- 1216,1223 ----
+ hashitem_T *hi;
+ dictitem_T *di;
+
++ PyDict_SetItemString(lookupDict, ptrBuf, result);
++
+ for (hi = ht->ht_array; todo > 0; ++hi)
+ {
+ if (!HASHITEM_EMPTY(hi))
+*** ../vim-7.2.083/src/version.c Tue Jan 13 17:27:18 2009
+--- src/version.c Tue Jan 13 17:54:14 2009
+***************
+*** 678,679 ****
+--- 678,681 ----
+ { /* Add new patch number below this line */
++ /**/
++ 84,
+ /**/
+
+--
+Article in the first Free Software Magazine: "Bram Moolenaar studied electrical
+engineering at the Technical University of Delft and graduated in 1985 on a
+multi-processor Unix architecture."
+Response by "dimator": Could the school not afford a proper stage for the
+ceremony?
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
+/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\ download, build and distribute -- http://www.A-A-P.org ///
+ \\\ help me help AIDS victims -- http://ICCF-Holland.org ///