To: vim-dev@vim.org Subject: Patch 6.2.048 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.048 Problem: The Python interface doesn't compile with Python 2.3 when dynamically loaded. Solution: Use dll_PyObject_Malloc and dll_PyObject_Free. (Paul Moore) Files: src/if_python.c *** ../vim-6.2.047/src/if_python.c Fri Jul 25 22:28:06 2003 --- src/if_python.c Sat Jul 26 20:05:39 2003 *************** *** 111,116 **** --- 111,120 ---- # if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02020000 # define PyType_IsSubtype dll_PyType_IsSubtype # endif + # if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02030000 + # define PyObject_Malloc dll_PyObject_Malloc + # define PyObject_Free dll_PyObject_Free + # endif /* * Pointers for dynamic link *************** *** 156,161 **** --- 160,169 ---- # if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02020000 static int (*dll_PyType_IsSubtype)(PyTypeObject *, PyTypeObject *); # endif + # if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02030000 + static void* (*dll_PyObject_Malloc)(size_t); + static void (*dll_PyObject_Free)(void*); + # endif static HINSTANCE hinstPython = 0; /* Instance of python.dll */ *************** *** 222,227 **** --- 230,239 ---- {"_Py_NoneStruct", (PYTHON_PROC*)&dll__Py_NoneStruct}, # if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02020000 {"PyType_IsSubtype", (PYTHON_PROC*)&dll_PyType_IsSubtype}, + # endif + # if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02030000 + {"PyObject_Malloc", (PYTHON_PROC*)&dll_PyObject_Malloc}, + {"PyObject_Free", (PYTHON_PROC*)&dll_PyObject_Free}, # endif {"", NULL}, }; *** ../vim-6.2.047/src/version.c Sun Jul 27 14:29:34 2003 --- src/version.c Sun Jul 27 14:31:02 2003 *************** *** 632,633 **** --- 632,635 ---- { /* Add new patch number below this line */ + /**/ + 48, /**/ -- It is too bad that the speed of light hasn't kept pace with the changes in CPU speed and network bandwidth. -- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///