473,396 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Building Vim against Python 2.5

[Any python/C interface gurus please correct me if my understanding is
wrong, as this fix is slated for inclusion in future versions of
vim--thanks!]

Just as a heads up for anyone building vim with python2.5 as the
extension language:

Simple solution: Python 2.5 has tightened up how it does memory
allocation, so you need to ":%s/PyMem_DEL/Py_DECREF" in if_python.c or
you'll see segfaults when trying to use :py or :pyf statements.

Longer explantation: Every instance of PyMem_DEL in if_python.c is on a
standard PyObject * allocated with Py_BuildValue or similar.

If I understand correctly, really, PyMem_DEL is only supposed to be
paired with PyMem_ALLOC and any PyObject * objects should be freed with
Py_DECREF. But in earlier versions the two internally used the same
allocater so it happened to work; Python 2.5 is stricter about this.

I've only tested with vim 7.0 and python 2.3 and 2.5, but the same
change should work fine in older versions of vim.

The fix has been sent to Bram so future versions of vim should build
fine out of the box against python 2.5.

Sep 23 '06 #1
0 893

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mark Nelson | last post by:
Hi I'm trying to build Imaging 1.1.4 in Solaris 9, I get passwd the first step i.e the building of libImging. However when I execute a python setup.py build I get the following error - gcc...
2
by: Kylotan | last post by:
I need to be able to build Py2Exe from the source code as I am making a Windows executable where I wish to preprocess the modules before importing them.It looks like I can do this by adding lines...
6
by: Mike C. Fletcher | last post by:
I've put together a page describing how to build Python 2.4 extensions with the free (as in beer, not libre) Microsoft Visual C++ Toolkit compiler. So far I've been able to build Numpy 23.1,...
3
by: skip | last post by:
I'm having no success building the curses module on Solaris 8 (yes, I know it's ancient - advancing the state-of-the-art is not yet an option) for Python 2.4. Sun provides an apparently ancient...
6
by: JW | last post by:
I have a lousy little Python extension, generated with the generous help of Pyrex. In Linux, things are simple. I compile the extension, link it against some C stuff, and *poof*! everything...
4
by: vedrandekovic | last post by:
Hi, I have already install Microsoft visual studio .NET 2003 and MinGw, when I try to build a extension: python my_extension_setup.py build ( or install ) , I get an error: LINK : fatal...
8
by: Prateek | last post by:
Hello, I'm trying to package my python program into a linux executable using cx_freeze. The goal is that the user should require python on their system. I've managed to make the binaries on...
1
by: mhearne808[insert-at-sign-here]gmail[insert-dot-he | last post by:
I can't seem to get the zlib module to build on an RHEL box. I did the following: 1) Download zlib 1.2.3 2) configure;make;make install 3) Download python 2.5.2 4) configure;make;make install...
0
by: L. Lindstrom | last post by:
I build the Pygame releases for Windows. Pygame wraps the Simple Directmedia Layer (SDL) C library. I am doing preliminary research into porting Pygame to Python 2.6. For Pythons 2.4 and 2.5 the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.