home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.3 / 7.3.1100 < prev    next >
Encoding:
Internet Message Format  |  2013-06-01  |  33.5 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.1100
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.3.1100
  11. Problem:    Python: a few more memory problems.
  12. Solution:   Add and remove Py_XDECREF(). (ZyX)
  13. Files:        src/if_py_both.h, src/testdir/test86.in, src/testdir/test86.ok,
  14.         src/testdir/test87.in, src/testdir/test87.ok
  15.  
  16.  
  17. *** ../vim-7.3.1099/src/if_py_both.h    2013-06-02 18:20:12.000000000 +0200
  18. --- src/if_py_both.h    2013-06-02 18:41:12.000000000 +0200
  19. ***************
  20. *** 1236,1241 ****
  21. --- 1236,1242 ----
  22.       if (*key == NUL)
  23.       {
  24.       RAISE_NO_EMPTY_KEYS;
  25. +     Py_XDECREF(todecref);
  26.       return -1;
  27.       }
  28.   
  29. ***************
  30. *** 1254,1264 ****
  31. --- 1255,1269 ----
  32.       hi = hash_find(&dict->dv_hashtab, di->di_key);
  33.       hash_remove(&dict->dv_hashtab, hi);
  34.       dictitem_free(di);
  35. +     Py_XDECREF(todecref);
  36.       return 0;
  37.       }
  38.   
  39.       if (ConvertFromPyObject(valObject, &tv) == -1)
  40. +     {
  41. +     Py_XDECREF(todecref);
  42.       return -1;
  43. +     }
  44.   
  45.       if (di == NULL)
  46.       {
  47. ***************
  48. *** 2505,2515 ****
  49.       PyObject    *todecref;
  50.   
  51.       if ((val = StringToChars(valObject, &todecref)))
  52. -     {
  53.           r = set_option_value_for(key, 0, val, opt_flags,
  54.                       self->opt_type, self->from);
  55. -         Py_XDECREF(todecref);
  56. -     }
  57.       else
  58.           r = -1;
  59.       }
  60. --- 2510,2517 ----
  61. *** ../vim-7.3.1099/src/testdir/test86.in    2013-06-02 18:20:12.000000000 +0200
  62. --- src/testdir/test86.in    2013-06-02 18:42:24.000000000 +0200
  63. ***************
  64. *** 867,872 ****
  65. --- 867,873 ----
  66.       return subexpr_test(expr, 'ConvertFromPyObject', (
  67.           'None',                 # Not conversible
  68.           '{"": 1}',              # Empty key not allowed
  69. +         '{u"": 1}',             # Same, but with unicode object
  70.           'FailingMapping()',     #
  71.           'FailingMappingKey()',  #
  72.       ))
  73. *** ../vim-7.3.1099/src/testdir/test86.ok    2013-06-02 18:20:12.000000000 +0200
  74. --- src/testdir/test86.ok    2013-06-02 18:44:49.000000000 +0200
  75. ***************
  76. *** 503,508 ****
  77. --- 503,509 ----
  78.   >>> Testing ConvertFromPyObject using d["a"] = {"abc" : %s}
  79.   d["a"] = {"abc" : None}:(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  80.   d["a"] = {"abc" : {"": 1}}:(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  81. + d["a"] = {"abc" : {u"": 1}}:(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  82.   d["a"] = {"abc" : FailingMapping()}:(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  83.   d["a"] = {"abc" : FailingMappingKey()}:(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  84.   <<< Finished
  85. ***************
  86. *** 528,533 ****
  87. --- 529,535 ----
  88.   >>> Testing ConvertFromPyObject using d["a"] = Mapping({"abc" : %s})
  89.   d["a"] = Mapping({"abc" : None}):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  90.   d["a"] = Mapping({"abc" : {"": 1}}):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  91. + d["a"] = Mapping({"abc" : {u"": 1}}):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  92.   d["a"] = Mapping({"abc" : FailingMapping()}):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  93.   d["a"] = Mapping({"abc" : FailingMappingKey()}):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  94.   <<< Finished
  95. ***************
  96. *** 538,543 ****
  97. --- 540,546 ----
  98.   >>> Testing ConvertFromPyObject using d["a"] = %s
  99.   d["a"] = None:(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  100.   d["a"] = {"": 1}:(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  101. + d["a"] = {u"": 1}:(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  102.   d["a"] = FailingMapping():(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  103.   d["a"] = FailingMappingKey():(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  104.   <<< Finished
  105. ***************
  106. *** 568,573 ****
  107. --- 571,577 ----
  108.   >>> Testing ConvertFromPyObject using d.update({"abc" : %s})
  109.   d.update({"abc" : None}):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  110.   d.update({"abc" : {"": 1}}):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  111. + d.update({"abc" : {u"": 1}}):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  112.   d.update({"abc" : FailingMapping()}):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  113.   d.update({"abc" : FailingMappingKey()}):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  114.   <<< Finished
  115. ***************
  116. *** 593,598 ****
  117. --- 597,603 ----
  118.   >>> Testing ConvertFromPyObject using d.update(Mapping({"abc" : %s}))
  119.   d.update(Mapping({"abc" : None})):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  120.   d.update(Mapping({"abc" : {"": 1}})):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  121. + d.update(Mapping({"abc" : {u"": 1}})):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  122.   d.update(Mapping({"abc" : FailingMapping()})):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  123.   d.update(Mapping({"abc" : FailingMappingKey()})):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  124.   <<< Finished
  125. ***************
  126. *** 603,608 ****
  127. --- 608,614 ----
  128.   >>> Testing ConvertFromPyObject using d.update(%s)
  129.   d.update(None):(<type 'exceptions.TypeError'>, TypeError("'NoneType' object is not iterable",))
  130.   d.update({"": 1}):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  131. + d.update({u"": 1}):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  132.   d.update(FailingMapping()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  133.   d.update(FailingMappingKey()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  134.   <<< Finished
  135. ***************
  136. *** 633,638 ****
  137. --- 639,645 ----
  138.   >>> Testing ConvertFromPyObject using d.update((("a", {"abc" : %s}),))
  139.   d.update((("a", {"abc" : None}),)):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  140.   d.update((("a", {"abc" : {"": 1}}),)):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  141. + d.update((("a", {"abc" : {u"": 1}}),)):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  142.   d.update((("a", {"abc" : FailingMapping()}),)):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  143.   d.update((("a", {"abc" : FailingMappingKey()}),)):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  144.   <<< Finished
  145. ***************
  146. *** 658,663 ****
  147. --- 665,671 ----
  148.   >>> Testing ConvertFromPyObject using d.update((("a", Mapping({"abc" : %s})),))
  149.   d.update((("a", Mapping({"abc" : None})),)):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  150.   d.update((("a", Mapping({"abc" : {"": 1}})),)):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  151. + d.update((("a", Mapping({"abc" : {u"": 1}})),)):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  152.   d.update((("a", Mapping({"abc" : FailingMapping()})),)):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  153.   d.update((("a", Mapping({"abc" : FailingMappingKey()})),)):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  154.   <<< Finished
  155. ***************
  156. *** 668,673 ****
  157. --- 676,682 ----
  158.   >>> Testing ConvertFromPyObject using d.update((("a", %s),))
  159.   d.update((("a", None),)):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  160.   d.update((("a", {"": 1}),)):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  161. + d.update((("a", {u"": 1}),)):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  162.   d.update((("a", FailingMapping()),)):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  163.   d.update((("a", FailingMappingKey()),)):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  164.   <<< Finished
  165. ***************
  166. *** 701,706 ****
  167. --- 710,716 ----
  168.   >>> Testing ConvertFromPyObject using vim.List([{"abc" : %s}])
  169.   vim.List([{"abc" : None}]):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  170.   vim.List([{"abc" : {"": 1}}]):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  171. + vim.List([{"abc" : {u"": 1}}]):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  172.   vim.List([{"abc" : FailingMapping()}]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  173.   vim.List([{"abc" : FailingMappingKey()}]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  174.   <<< Finished
  175. ***************
  176. *** 726,731 ****
  177. --- 736,742 ----
  178.   >>> Testing ConvertFromPyObject using vim.List([Mapping({"abc" : %s})])
  179.   vim.List([Mapping({"abc" : None})]):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  180.   vim.List([Mapping({"abc" : {"": 1}})]):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  181. + vim.List([Mapping({"abc" : {u"": 1}})]):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  182.   vim.List([Mapping({"abc" : FailingMapping()})]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  183.   vim.List([Mapping({"abc" : FailingMappingKey()})]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  184.   <<< Finished
  185. ***************
  186. *** 736,741 ****
  187. --- 747,753 ----
  188.   >>> Testing ConvertFromPyObject using vim.List([%s])
  189.   vim.List([None]):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  190.   vim.List([{"": 1}]):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  191. + vim.List([{u"": 1}]):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  192.   vim.List([FailingMapping()]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  193.   vim.List([FailingMappingKey()]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  194.   <<< Finished
  195. ***************
  196. *** 768,773 ****
  197. --- 780,786 ----
  198.   >>> Testing ConvertFromPyObject using l[:] = [{"abc" : %s}]
  199.   l[:] = [{"abc" : None}]:(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  200.   l[:] = [{"abc" : {"": 1}}]:(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  201. + l[:] = [{"abc" : {u"": 1}}]:(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  202.   l[:] = [{"abc" : FailingMapping()}]:(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  203.   l[:] = [{"abc" : FailingMappingKey()}]:(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  204.   <<< Finished
  205. ***************
  206. *** 793,798 ****
  207. --- 806,812 ----
  208.   >>> Testing ConvertFromPyObject using l[:] = [Mapping({"abc" : %s})]
  209.   l[:] = [Mapping({"abc" : None})]:(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  210.   l[:] = [Mapping({"abc" : {"": 1}})]:(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  211. + l[:] = [Mapping({"abc" : {u"": 1}})]:(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  212.   l[:] = [Mapping({"abc" : FailingMapping()})]:(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  213.   l[:] = [Mapping({"abc" : FailingMappingKey()})]:(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  214.   <<< Finished
  215. ***************
  216. *** 803,808 ****
  217. --- 817,823 ----
  218.   >>> Testing ConvertFromPyObject using l[:] = [%s]
  219.   l[:] = [None]:(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  220.   l[:] = [{"": 1}]:(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  221. + l[:] = [{u"": 1}]:(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  222.   l[:] = [FailingMapping()]:(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  223.   l[:] = [FailingMappingKey()]:(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  224.   <<< Finished
  225. ***************
  226. *** 829,834 ****
  227. --- 844,850 ----
  228.   >>> Testing ConvertFromPyObject using l.extend([{"abc" : %s}])
  229.   l.extend([{"abc" : None}]):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  230.   l.extend([{"abc" : {"": 1}}]):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  231. + l.extend([{"abc" : {u"": 1}}]):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  232.   l.extend([{"abc" : FailingMapping()}]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  233.   l.extend([{"abc" : FailingMappingKey()}]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  234.   <<< Finished
  235. ***************
  236. *** 854,859 ****
  237. --- 870,876 ----
  238.   >>> Testing ConvertFromPyObject using l.extend([Mapping({"abc" : %s})])
  239.   l.extend([Mapping({"abc" : None})]):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  240.   l.extend([Mapping({"abc" : {"": 1}})]):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  241. + l.extend([Mapping({"abc" : {u"": 1}})]):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  242.   l.extend([Mapping({"abc" : FailingMapping()})]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  243.   l.extend([Mapping({"abc" : FailingMappingKey()})]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  244.   <<< Finished
  245. ***************
  246. *** 864,869 ****
  247. --- 881,887 ----
  248.   >>> Testing ConvertFromPyObject using l.extend([%s])
  249.   l.extend([None]):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  250.   l.extend([{"": 1}]):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  251. + l.extend([{u"": 1}]):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  252.   l.extend([FailingMapping()]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  253.   l.extend([FailingMappingKey()]):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  254.   <<< Finished
  255. ***************
  256. *** 899,904 ****
  257. --- 917,923 ----
  258.   >>> Testing ConvertFromPyObject using f({"abc" : %s})
  259.   f({"abc" : None}):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  260.   f({"abc" : {"": 1}}):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  261. + f({"abc" : {u"": 1}}):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  262.   f({"abc" : FailingMapping()}):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  263.   f({"abc" : FailingMappingKey()}):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  264.   <<< Finished
  265. ***************
  266. *** 924,929 ****
  267. --- 943,949 ----
  268.   >>> Testing ConvertFromPyObject using f(Mapping({"abc" : %s}))
  269.   f(Mapping({"abc" : None})):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  270.   f(Mapping({"abc" : {"": 1}})):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  271. + f(Mapping({"abc" : {u"": 1}})):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  272.   f(Mapping({"abc" : FailingMapping()})):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  273.   f(Mapping({"abc" : FailingMappingKey()})):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  274.   <<< Finished
  275. ***************
  276. *** 934,939 ****
  277. --- 954,960 ----
  278.   >>> Testing ConvertFromPyObject using f(%s)
  279.   f(None):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  280.   f({"": 1}):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  281. + f({u"": 1}):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  282.   f(FailingMapping()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  283.   f(FailingMappingKey()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  284.   <<< Finished
  285. ***************
  286. *** 959,964 ****
  287. --- 980,986 ----
  288.   >>> Testing ConvertFromPyObject using fd(self={"abc" : %s})
  289.   fd(self={"abc" : None}):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  290.   fd(self={"abc" : {"": 1}}):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  291. + fd(self={"abc" : {u"": 1}}):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  292.   fd(self={"abc" : FailingMapping()}):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  293.   fd(self={"abc" : FailingMappingKey()}):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  294.   <<< Finished
  295. ***************
  296. *** 984,989 ****
  297. --- 1006,1012 ----
  298.   >>> Testing ConvertFromPyObject using fd(self=Mapping({"abc" : %s}))
  299.   fd(self=Mapping({"abc" : None})):(<type 'exceptions.TypeError'>, TypeError('unable to convert to vim structure',))
  300.   fd(self=Mapping({"abc" : {"": 1}})):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  301. + fd(self=Mapping({"abc" : {u"": 1}})):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  302.   fd(self=Mapping({"abc" : FailingMapping()})):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  303.   fd(self=Mapping({"abc" : FailingMappingKey()})):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  304.   <<< Finished
  305. ***************
  306. *** 994,999 ****
  307. --- 1017,1023 ----
  308.   >>> Testing ConvertFromPyObject using fd(self=%s)
  309.   fd(self=None):(<type 'exceptions.TypeError'>, TypeError('unable to convert object to vim dictionary',))
  310.   fd(self={"": 1}):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  311. + fd(self={u"": 1}):(<type 'exceptions.ValueError'>, ValueError('empty keys are not allowed',))
  312.   fd(self=FailingMapping()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  313.   fd(self=FailingMappingKey()):(<type 'exceptions.NotImplementedError'>, NotImplementedError())
  314.   <<< Finished
  315. *** ../vim-7.3.1099/src/testdir/test87.in    2013-06-02 18:20:12.000000000 +0200
  316. --- src/testdir/test87.in    2013-06-02 18:44:49.000000000 +0200
  317. ***************
  318. *** 833,839 ****
  319.       iter_test(expr)
  320.       return subexpr_test(expr, 'ConvertFromPyObject', (
  321.           'None',                 # Not conversible
  322. !         '{"": 1}',              # Empty key not allowed
  323.           'FailingMapping()',     #
  324.           'FailingMappingKey()',  #
  325.       ))
  326. --- 833,840 ----
  327.       iter_test(expr)
  328.       return subexpr_test(expr, 'ConvertFromPyObject', (
  329.           'None',                 # Not conversible
  330. !         '{b"": 1}',             # Empty key not allowed
  331. !         '{"": 1}',              # Same, but with unicode object
  332.           'FailingMapping()',     #
  333.           'FailingMappingKey()',  #
  334.       ))
  335. *** ../vim-7.3.1099/src/testdir/test87.ok    2013-06-02 18:20:12.000000000 +0200
  336. --- src/testdir/test87.ok    2013-06-02 18:44:49.000000000 +0200
  337. ***************
  338. *** 495,500 ****
  339. --- 495,501 ----
  340.   <<< Finished
  341.   >>> Testing ConvertFromPyObject using d["a"] = {"abc" : %s}
  342.   d["a"] = {"abc" : None}:(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  343. + d["a"] = {"abc" : {b"": 1}}:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  344.   d["a"] = {"abc" : {"": 1}}:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  345.   d["a"] = {"abc" : FailingMapping()}:(<class 'NotImplementedError'>, NotImplementedError())
  346.   d["a"] = {"abc" : FailingMappingKey()}:(<class 'NotImplementedError'>, NotImplementedError())
  347. ***************
  348. *** 520,525 ****
  349. --- 521,527 ----
  350.   <<< Finished
  351.   >>> Testing ConvertFromPyObject using d["a"] = Mapping({"abc" : %s})
  352.   d["a"] = Mapping({"abc" : None}):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  353. + d["a"] = Mapping({"abc" : {b"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  354.   d["a"] = Mapping({"abc" : {"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  355.   d["a"] = Mapping({"abc" : FailingMapping()}):(<class 'NotImplementedError'>, NotImplementedError())
  356.   d["a"] = Mapping({"abc" : FailingMappingKey()}):(<class 'NotImplementedError'>, NotImplementedError())
  357. ***************
  358. *** 530,535 ****
  359. --- 532,538 ----
  360.   <<< Finished
  361.   >>> Testing ConvertFromPyObject using d["a"] = %s
  362.   d["a"] = None:(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  363. + d["a"] = {b"": 1}:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  364.   d["a"] = {"": 1}:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  365.   d["a"] = FailingMapping():(<class 'NotImplementedError'>, NotImplementedError())
  366.   d["a"] = FailingMappingKey():(<class 'NotImplementedError'>, NotImplementedError())
  367. ***************
  368. *** 564,569 ****
  369. --- 567,573 ----
  370.   <<< Finished
  371.   >>> Testing ConvertFromPyObject using d.update({"abc" : %s})
  372.   d.update({"abc" : None}):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  373. + d.update({"abc" : {b"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  374.   d.update({"abc" : {"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  375.   d.update({"abc" : FailingMapping()}):(<class 'NotImplementedError'>, NotImplementedError())
  376.   d.update({"abc" : FailingMappingKey()}):(<class 'NotImplementedError'>, NotImplementedError())
  377. ***************
  378. *** 589,594 ****
  379. --- 593,599 ----
  380.   <<< Finished
  381.   >>> Testing ConvertFromPyObject using d.update(Mapping({"abc" : %s}))
  382.   d.update(Mapping({"abc" : None})):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  383. + d.update(Mapping({"abc" : {b"": 1}})):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  384.   d.update(Mapping({"abc" : {"": 1}})):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  385.   d.update(Mapping({"abc" : FailingMapping()})):(<class 'NotImplementedError'>, NotImplementedError())
  386.   d.update(Mapping({"abc" : FailingMappingKey()})):(<class 'NotImplementedError'>, NotImplementedError())
  387. ***************
  388. *** 599,604 ****
  389. --- 604,610 ----
  390.   <<< Finished
  391.   >>> Testing ConvertFromPyObject using d.update(%s)
  392.   d.update(None):(<class 'TypeError'>, TypeError("'NoneType' object is not iterable",))
  393. + d.update({b"": 1}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  394.   d.update({"": 1}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  395.   d.update(FailingMapping()):(<class 'NotImplementedError'>, NotImplementedError())
  396.   d.update(FailingMappingKey()):(<class 'NotImplementedError'>, NotImplementedError())
  397. ***************
  398. *** 629,634 ****
  399. --- 635,641 ----
  400.   <<< Finished
  401.   >>> Testing ConvertFromPyObject using d.update((("a", {"abc" : %s}),))
  402.   d.update((("a", {"abc" : None}),)):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  403. + d.update((("a", {"abc" : {b"": 1}}),)):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  404.   d.update((("a", {"abc" : {"": 1}}),)):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  405.   d.update((("a", {"abc" : FailingMapping()}),)):(<class 'NotImplementedError'>, NotImplementedError())
  406.   d.update((("a", {"abc" : FailingMappingKey()}),)):(<class 'NotImplementedError'>, NotImplementedError())
  407. ***************
  408. *** 654,659 ****
  409. --- 661,667 ----
  410.   <<< Finished
  411.   >>> Testing ConvertFromPyObject using d.update((("a", Mapping({"abc" : %s})),))
  412.   d.update((("a", Mapping({"abc" : None})),)):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  413. + d.update((("a", Mapping({"abc" : {b"": 1}})),)):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  414.   d.update((("a", Mapping({"abc" : {"": 1}})),)):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  415.   d.update((("a", Mapping({"abc" : FailingMapping()})),)):(<class 'NotImplementedError'>, NotImplementedError())
  416.   d.update((("a", Mapping({"abc" : FailingMappingKey()})),)):(<class 'NotImplementedError'>, NotImplementedError())
  417. ***************
  418. *** 664,669 ****
  419. --- 672,678 ----
  420.   <<< Finished
  421.   >>> Testing ConvertFromPyObject using d.update((("a", %s),))
  422.   d.update((("a", None),)):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  423. + d.update((("a", {b"": 1}),)):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  424.   d.update((("a", {"": 1}),)):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  425.   d.update((("a", FailingMapping()),)):(<class 'NotImplementedError'>, NotImplementedError())
  426.   d.update((("a", FailingMappingKey()),)):(<class 'NotImplementedError'>, NotImplementedError())
  427. ***************
  428. *** 701,706 ****
  429. --- 710,716 ----
  430.   <<< Finished
  431.   >>> Testing ConvertFromPyObject using vim.List([{"abc" : %s}])
  432.   vim.List([{"abc" : None}]):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  433. + vim.List([{"abc" : {b"": 1}}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  434.   vim.List([{"abc" : {"": 1}}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  435.   vim.List([{"abc" : FailingMapping()}]):(<class 'NotImplementedError'>, NotImplementedError())
  436.   vim.List([{"abc" : FailingMappingKey()}]):(<class 'NotImplementedError'>, NotImplementedError())
  437. ***************
  438. *** 726,731 ****
  439. --- 736,742 ----
  440.   <<< Finished
  441.   >>> Testing ConvertFromPyObject using vim.List([Mapping({"abc" : %s})])
  442.   vim.List([Mapping({"abc" : None})]):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  443. + vim.List([Mapping({"abc" : {b"": 1}})]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  444.   vim.List([Mapping({"abc" : {"": 1}})]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  445.   vim.List([Mapping({"abc" : FailingMapping()})]):(<class 'NotImplementedError'>, NotImplementedError())
  446.   vim.List([Mapping({"abc" : FailingMappingKey()})]):(<class 'NotImplementedError'>, NotImplementedError())
  447. ***************
  448. *** 736,741 ****
  449. --- 747,753 ----
  450.   <<< Finished
  451.   >>> Testing ConvertFromPyObject using vim.List([%s])
  452.   vim.List([None]):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  453. + vim.List([{b"": 1}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  454.   vim.List([{"": 1}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  455.   vim.List([FailingMapping()]):(<class 'NotImplementedError'>, NotImplementedError())
  456.   vim.List([FailingMappingKey()]):(<class 'NotImplementedError'>, NotImplementedError())
  457. ***************
  458. *** 772,777 ****
  459. --- 784,790 ----
  460.   <<< Finished
  461.   >>> Testing ConvertFromPyObject using l[:] = [{"abc" : %s}]
  462.   l[:] = [{"abc" : None}]:(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  463. + l[:] = [{"abc" : {b"": 1}}]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  464.   l[:] = [{"abc" : {"": 1}}]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  465.   l[:] = [{"abc" : FailingMapping()}]:(<class 'NotImplementedError'>, NotImplementedError())
  466.   l[:] = [{"abc" : FailingMappingKey()}]:(<class 'NotImplementedError'>, NotImplementedError())
  467. ***************
  468. *** 797,802 ****
  469. --- 810,816 ----
  470.   <<< Finished
  471.   >>> Testing ConvertFromPyObject using l[:] = [Mapping({"abc" : %s})]
  472.   l[:] = [Mapping({"abc" : None})]:(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  473. + l[:] = [Mapping({"abc" : {b"": 1}})]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  474.   l[:] = [Mapping({"abc" : {"": 1}})]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  475.   l[:] = [Mapping({"abc" : FailingMapping()})]:(<class 'NotImplementedError'>, NotImplementedError())
  476.   l[:] = [Mapping({"abc" : FailingMappingKey()})]:(<class 'NotImplementedError'>, NotImplementedError())
  477. ***************
  478. *** 807,812 ****
  479. --- 821,827 ----
  480.   <<< Finished
  481.   >>> Testing ConvertFromPyObject using l[:] = [%s]
  482.   l[:] = [None]:(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  483. + l[:] = [{b"": 1}]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  484.   l[:] = [{"": 1}]:(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  485.   l[:] = [FailingMapping()]:(<class 'NotImplementedError'>, NotImplementedError())
  486.   l[:] = [FailingMappingKey()]:(<class 'NotImplementedError'>, NotImplementedError())
  487. ***************
  488. *** 837,842 ****
  489. --- 852,858 ----
  490.   <<< Finished
  491.   >>> Testing ConvertFromPyObject using l.extend([{"abc" : %s}])
  492.   l.extend([{"abc" : None}]):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  493. + l.extend([{"abc" : {b"": 1}}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  494.   l.extend([{"abc" : {"": 1}}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  495.   l.extend([{"abc" : FailingMapping()}]):(<class 'NotImplementedError'>, NotImplementedError())
  496.   l.extend([{"abc" : FailingMappingKey()}]):(<class 'NotImplementedError'>, NotImplementedError())
  497. ***************
  498. *** 862,867 ****
  499. --- 878,884 ----
  500.   <<< Finished
  501.   >>> Testing ConvertFromPyObject using l.extend([Mapping({"abc" : %s})])
  502.   l.extend([Mapping({"abc" : None})]):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  503. + l.extend([Mapping({"abc" : {b"": 1}})]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  504.   l.extend([Mapping({"abc" : {"": 1}})]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  505.   l.extend([Mapping({"abc" : FailingMapping()})]):(<class 'NotImplementedError'>, NotImplementedError())
  506.   l.extend([Mapping({"abc" : FailingMappingKey()})]):(<class 'NotImplementedError'>, NotImplementedError())
  507. ***************
  508. *** 872,877 ****
  509. --- 889,895 ----
  510.   <<< Finished
  511.   >>> Testing ConvertFromPyObject using l.extend([%s])
  512.   l.extend([None]):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  513. + l.extend([{b"": 1}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  514.   l.extend([{"": 1}]):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  515.   l.extend([FailingMapping()]):(<class 'NotImplementedError'>, NotImplementedError())
  516.   l.extend([FailingMappingKey()]):(<class 'NotImplementedError'>, NotImplementedError())
  517. ***************
  518. *** 907,912 ****
  519. --- 925,931 ----
  520.   <<< Finished
  521.   >>> Testing ConvertFromPyObject using f({"abc" : %s})
  522.   f({"abc" : None}):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  523. + f({"abc" : {b"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  524.   f({"abc" : {"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  525.   f({"abc" : FailingMapping()}):(<class 'NotImplementedError'>, NotImplementedError())
  526.   f({"abc" : FailingMappingKey()}):(<class 'NotImplementedError'>, NotImplementedError())
  527. ***************
  528. *** 932,937 ****
  529. --- 951,957 ----
  530.   <<< Finished
  531.   >>> Testing ConvertFromPyObject using f(Mapping({"abc" : %s}))
  532.   f(Mapping({"abc" : None})):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  533. + f(Mapping({"abc" : {b"": 1}})):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  534.   f(Mapping({"abc" : {"": 1}})):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  535.   f(Mapping({"abc" : FailingMapping()})):(<class 'NotImplementedError'>, NotImplementedError())
  536.   f(Mapping({"abc" : FailingMappingKey()})):(<class 'NotImplementedError'>, NotImplementedError())
  537. ***************
  538. *** 942,947 ****
  539. --- 962,968 ----
  540.   <<< Finished
  541.   >>> Testing ConvertFromPyObject using f(%s)
  542.   f(None):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  543. + f({b"": 1}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  544.   f({"": 1}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  545.   f(FailingMapping()):(<class 'NotImplementedError'>, NotImplementedError())
  546.   f(FailingMappingKey()):(<class 'NotImplementedError'>, NotImplementedError())
  547. ***************
  548. *** 967,972 ****
  549. --- 988,994 ----
  550.   <<< Finished
  551.   >>> Testing ConvertFromPyObject using fd(self={"abc" : %s})
  552.   fd(self={"abc" : None}):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  553. + fd(self={"abc" : {b"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  554.   fd(self={"abc" : {"": 1}}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  555.   fd(self={"abc" : FailingMapping()}):(<class 'NotImplementedError'>, NotImplementedError())
  556.   fd(self={"abc" : FailingMappingKey()}):(<class 'NotImplementedError'>, NotImplementedError())
  557. ***************
  558. *** 992,997 ****
  559. --- 1014,1020 ----
  560.   <<< Finished
  561.   >>> Testing ConvertFromPyObject using fd(self=Mapping({"abc" : %s}))
  562.   fd(self=Mapping({"abc" : None})):(<class 'TypeError'>, TypeError('unable to convert to vim structure',))
  563. + fd(self=Mapping({"abc" : {b"": 1}})):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  564.   fd(self=Mapping({"abc" : {"": 1}})):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  565.   fd(self=Mapping({"abc" : FailingMapping()})):(<class 'NotImplementedError'>, NotImplementedError())
  566.   fd(self=Mapping({"abc" : FailingMappingKey()})):(<class 'NotImplementedError'>, NotImplementedError())
  567. ***************
  568. *** 1002,1007 ****
  569. --- 1025,1031 ----
  570.   <<< Finished
  571.   >>> Testing ConvertFromPyObject using fd(self=%s)
  572.   fd(self=None):(<class 'TypeError'>, TypeError('unable to convert object to vim dictionary',))
  573. + fd(self={b"": 1}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  574.   fd(self={"": 1}):(<class 'ValueError'>, ValueError('empty keys are not allowed',))
  575.   fd(self=FailingMapping()):(<class 'NotImplementedError'>, NotImplementedError())
  576.   fd(self=FailingMappingKey()):(<class 'NotImplementedError'>, NotImplementedError())
  577. *** ../vim-7.3.1099/src/version.c    2013-06-02 18:20:12.000000000 +0200
  578. --- src/version.c    2013-06-02 18:53:59.000000000 +0200
  579. ***************
  580. *** 730,731 ****
  581. --- 730,733 ----
  582.   {   /* Add new patch number below this line */
  583. + /**/
  584. +     1100,
  585.   /**/
  586.  
  587. -- 
  588. hundred-and-one symptoms of being an internet addict:
  589. 48. You get a tatoo that says "This body best viewed with Netscape 3.1 or
  590.     higher."
  591.  
  592.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  593. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  594. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  595.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  596.