воскресенье, 9 сентября 2012 г., 0:15:15 UTC+4 пользователь Sean Estabrooks 
написал:
> You're on the right track obviously, but I don't really understand why the 
> patch you've given is required.  How does loading libpython dynamically 
> affect this sitation?  On line 45 of if_python.c we define PY_SSIZE_T_CLEAN 
> just before including Python.h which will then subsequently load modsupport.h 
> where the proper defines should happen.  Where does this fall down for you 
> when you're compiling?

What happens when you do

#define A B
#define A C
? It is a warning and A is now C [1]. But we need no warnings hence we undefine 
it [2] a few lines before. And even more lines before there is an answer to the 
question "why when dynamic python only" [3].

The reason of having [1] is to avoid #if branching when using newer python: we 
need to import all symbols we use and without #undef you have to write more 
lines to import other symbols on newer python.

[1]: 
https://bitbucket.org/ZyX_I/vim/src/36b3878656262abb03c3cd98b116208569be58c4/src/if_python.c#cl-143
[2]: 
https://bitbucket.org/ZyX_I/vim/src/36b3878656262abb03c3cd98b116208569be58c4/src/if_python.c#cl-133
[3]: 
https://bitbucket.org/ZyX_I/vim/src/36b3878656262abb03c3cd98b116208569be58c4/src/if_python.c#cl-106

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui