You should patch it as well, and get the latest runtime. Patching is
quite easy, but it's a bit complex to describe (I'm hoping to do a wiki
page on it one day). I don't know a practical way to get the latest
runtime except by using rsync on a Unix-based system.
> if_python.c: In function `PythonIO_Init':
> if_python.c:951: error: structure has no member named `ob_type'
I don't know the details of what's going on, but ob_type is defined in a
Python header (look for a file like /Python30/include/object.h).
Somehow, the Vim compile is supposed to include object.h, or equivalent.
I'm giving this clue, in the hope that someone will explain what step
you are missing. Check how you are telling your compiler where your
Python is (try the make file).
John
Daniel Hast wrote:
> I downloaded the Vim 7.2 source from
> ftp://ftp.vim.org/pub/vim/pc/vim72src.zip
You should patch it as well, and get the latest runtime. Patching is
quite easy, but it's a bit complex to describe (I'm hoping to do a wiki
page on it one day). I don't know a practical way to get the latest
runtime except by using rsync on a Unix-based system.
> if_python.c: In function `PythonIO_Init':
> if_python.c:951: error: structure has no member named `ob_type'
I don't know the details of what's going on, but ob_type is defined in a
Python header (look for a file like /Python30/include/object.h).
Somehow, the Vim compile is supposed to include object.h, or equivalent.
I'm giving this clue, in the hope that someone will explain what step
you are missing. Check how you are telling your compiler where your
Python is (try the make file).
John
I haven't built Vim for a while. On the last occasion (Windows), I set
the following environment variables:
set GUI=yes
set DYNAMIC_PYTHON=yes
set PYTHON=C:/Python25
set PYTHON_VER=25
You could try copying your Python30 to C:\ although it's hard to see why
it should matter (given that your PYTHON path above has no embedded
space).
I would experiment with object.h. Perhaps rename it (to force a compile
error), or put '#error Hello' in first line and see what the compiler
says.
A very quick look at Vim's if_python.c makes me think that Python's
object.h needs to define:
PyObject_HEAD_INIT()
which should define ob_type. Hmmm, I have to go now, but a really quick
look at object.h makes me wonder if Py_TRACE_REFS is defined on your
system (I guess that it should NOT be). Or, maybe Python 3.0 has
different stuff in object.h?
John
IIUC, Vim expects the structure type PyTypeObject, defined in Python.h,
to have a member named ob_type. Any Python release notes or other docs
about what might have changed between 2.6 (where I compile this
interface with no error) and 3.0?
Best regards,
Tony.
--
If God had intended Men to Smoke, He would have put Chimneys in their
Heads.
Apparently Python 3.0 has a new interface. Someone needs to study this
and work out what the change means for Vim. For example, see:
http://bugs.python.org/issue4385
http://www.python.org/dev/peps/pep-3123/
http://www.mail-archive.com/pytho...@python.org/msg15045.html
John