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 / 6.1.114 < prev    next >
Encoding:
Internet Message Format  |  2002-06-27  |  1.8 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.114
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.1.114
  11. Problem:    ":python import vim", ":python vim.current.buffer[0:0] = []" gives
  12.         a lalloc(0) error. (Chris Southern)
  13. Solution:   Don't allocate an array when it's size is zero.
  14. Files:        src/if_python.c
  15.  
  16.  
  17. *** ../vim61.113/src/if_python.c    Fri Jan 11 09:53:29 2002
  18. --- src/if_python.c    Fri Jun 28 19:08:25 2002
  19. ***************
  20. *** 2305,2315 ****
  21.       char    **array;
  22.       buf_T    *savebuf;
  23.   
  24. !     array = (char **)alloc((unsigned)(new_len * sizeof(char *)));
  25. !     if (array == NULL)
  26.       {
  27. !         PyErr_NoMemory();
  28. !         return FAIL;
  29.       }
  30.   
  31.       for (i = 0; i < new_len; ++i)
  32. --- 2305,2320 ----
  33.       char    **array;
  34.       buf_T    *savebuf;
  35.   
  36. !     if (new_len == 0)    /* avoid allocating zero bytes */
  37. !         array = NULL;
  38. !     else
  39.       {
  40. !         array = (char **)alloc((unsigned)(new_len * sizeof(char *)));
  41. !         if (array == NULL)
  42. !         {
  43. !         PyErr_NoMemory();
  44. !         return FAIL;
  45. !         }
  46.       }
  47.   
  48.       for (i = 0; i < new_len; ++i)
  49. *** ../vim61.113/src/version.c    Thu Jun 27 21:27:57 2002
  50. --- src/version.c    Fri Jun 28 19:11:15 2002
  51. ***************
  52. *** 608,609 ****
  53. --- 608,611 ----
  54.   {   /* Add new patch number below this line */
  55. + /**/
  56. +     114,
  57.   /**/
  58.  
  59. -- 
  60. WOMAN:   King of the who?
  61. ARTHUR:  The Britons.
  62. WOMAN:   Who are the Britons?
  63. ARTHUR:  Well, we all are. we're all Britons and I am your king.
  64.                                   The Quest for the Holy Grail (Monty Python)
  65.  
  66.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  67. ///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
  68. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  69.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  70.