Age | Commit message (Collapse) | Author |
|
Problem: confusing ifdefs in if_<lang>.c
Solution: refactor ifndefs to #ifdefs
if_x: Avoid using #ifndef - #else - #endif
Using #ifndef - #else - #endif is sometimes confusing.
Use #ifdef - #else - #endif instead.
closes: #13310
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
|
|
Problem: undefined behaviour with python function pointer
Solution: correctly cast function pointers from void
Fix more undefined behaviors in if_python
Fix remaining UBSAN errors from Clang 17 in if_python in casting
function pointers.
Also fix a mistake where `PyMem_Free()` should be returning void, by the
dynamic build is mistakenly casting it as a function that returns an
int.
closes: #13128
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
|
|
Problem: if_python: undefined behaviour for function pointers
Solution: Fix if_python undefined behavior for function pointer casts
Identified by clang 17 UBSAN (see #12745). Make sure to cast function
pointers with the same signature only.
closes: #13122
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
|
|
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes #11805)
|
|
Problem: Error messages are spread out.
Solution: Move the last error messages to errors.h.
|
|
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
|
|
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
|
|
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
|
|
Problem: Error messages are spread out.
Solution: Move more errors to errors.h.
|
|
Problem: Various spelling mistakes in comments.
Solution: Fix the mistakes. (Dominique Pellé, closes #9416)
|
|
Problem: Dynamic library load error does not mention why it failed.
Solution: Add the error message. (Martin Tournoij, closes #8621)
|
|
Problem: Python 3: non-utf8 character cannot be handled.
Solution: Change the string decode. (Björn Linse, closes #1053)
|
|
Problem: Compiler warnings when using Python.
Solution: Adjust PyCFunction to also have the second argument. Use "int"
return type for some functions. Insert "(void *)" to get rid of
the remaining warnings.
|
|
Problem: Unloading shared libraries on exit has no purpose.
Solution: Do not unload shared libraries on exit.
|
|
Problem: Using old C style comments.
Solution: Use // comments where appropriate.
|
|
Problem: pyeval() and py3eval() leak memory.
Solution: Do not increase the reference count twice. (Ozaki Kiichi,
closes #4129)
|
|
Problem: Using :python sets 'pyxversion' even when not executed.
Solution: Check the "skip" flag. (Shane Harper, closes #3995)
|
|
Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and
others.
Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the
GUI build. (Hirohito Higashi, closes #3932)
|
|
Problem: Cannot build Python interface with Python 2.4. (Tom G. Christensen)
Solution: Define PyBytes_FromStringAndSize. (Ken Takata, closes #3888)
|
|
Problem: Giving error messages is not flexible.
Solution: Add semsg(). Change argument from "char_u *" to "char *", also
for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes
#3302) Also make emsg() accept a "char *" argument. Get rid of
an enormous number of type casts.
|
|
Problem: Cannot handle binary data.
Solution: Add the Blob type. (Yasuhiro Matsumoto, closes #3638)
|
|
Problem: Python interface is incompatible with lldb.
Solution: For OutputType set the base to be PyFile_Type. (Boxu Zhang)
Partly disabled to avoid a crash.
|
|
Problem: Warnings for conversion of void to function pointer.
Solution: Use a temp variable that is a function pointer.
|
|
Problem: Various small problems in source files.
Solution: Fix the problems.
|
|
Problem: It is difficult to set the python home directory properly for
Python 2.7 and 3.5 since both use $PYTHONHOME.
Solution: Add the 'pythonhome' and 'pythonthreehome' options. (Kazuki
Sakamoto, closes #1266)
|
|
Problem: Mac features are confusing.
Solution: Make feature names more consistent, add "osxdarwin". Rename
feature flags, cleanup Mac code. (Kazunobu Kuriyama, closes #2178)
|
|
Problem: FEAT_WINDOWS adds a lot of #ifdefs while it is nearly always
enabled and only adds 7% to the binary size of the tiny build.
Solution: Graduate FEAT_WINDOWS.
|
|
Problem: When a timer uses ":pyeval" or another Python command and it
happens to be triggered while exiting a Crash may happen.
(Ricky Zhou)
Solution: Avoid running a Python command after python_end() was called.
Do not trigger timers while exiting. (closes #1824)
|
|
Problem: It is not so easy to write a script that works with both Python 2
and Python 3, even when the Python code works with both.
Solution: Add 'pyxversion', :pyx, etc. (Marc Weber, Ken Takata)
|
|
Problem: No "closed", "errors" and "encoding" attribute on Python output.
Solution: Add attributes and more tests. (Roland Puntaier, closes #622)
|
|
Problem: Python: turns partial into simple funcref.
Solution: Use partials like partials. (Nikolai Pavlov, closes #734)
|
|
Problem: Passing cookie to a callback is clumsy.
Solution: Change function() to take arguments and return a partial.
|
|
Problem: Many compiler warnings with MingW.
Solution: Add type casts. (Yasuhiro Matsumoto)
|
|
Problem: Using a channel handle does not allow for freeing it when unused.
Solution: Add the Channel variable type.
|
|
Problem: Missing case value.
Solution: Add VAR_JOB.
|
|
Problem: Using future enum value.
Solution: Remove it.
|
|
Problem: Warnings for missing values in switch.
Solution: Change switch to if-else or add values.
|
|
Problem: Using old style function declarations.
Solution: Change to new style function declarations. (script by Hirohito
Higashi)
|
|
Problem: Cannot use the "dll" options on MS-Windows.
Solution: Support the options on all platforms. Use the built-in name as
the default, so that it's clear what Vim is looking for.
|
|
Problem: Vim overwrites the value of $PYTHONHOME.
Solution: Do not set $PYTHONHOME if it is already set. (Kazuki Sakamoto,
closes #500)
|
|
Problem: Libraries for dynamically loading interfaces can only be defined
at compile time.
Solution: Add options to specify the dll names. (Kazuki Sakamoto,
closes #452)
|
|
Problem: For complicated list and dict use the garbage collector can run
out of stack space.
Solution: Use a stack of dicts and lists to be marked, thus making it
iterative instead of recursive. (Ben Fritz)
|
|
Problem: Loading python may cause Vim to exit.
Solution: Avoid loading the "site" module. (Taro Muraoka)
|
|
Problem: Compiler warnings when building with Python 3.2.
Solution: Make type cast depend on Python version. (Ken Takata)
|
|
Problem: SIZEOF_LONG clashes with similar defines in header files.
Solution: Rename to a name starting with VIM_. Also for SIZEOF_INT.
|
|
Problem: Compiler warning for pointer type.
Solution: Add type cast.
|
|
Problem: Python: slices with steps are not supported.
Solution: Support slices in Python vim.List. (ZyX)
|
|
Problem: Declaration has wrong return type for PyObject_SetAttrString().
Solution: Use int instead of PyObject. (Andreas Schwab)
|
|
Problem: Python SystemExit exception is not handled properly.
Solution: Catch the exception and give an error. (Yasuhiro Matsumoto, Ken
Takata)
|
|
Problem: Crash in Python interface on 64 bit machines.
Solution: Change argument type of PyString_AsStringAndSize. (Taro Muraoka,
Jun Takimoto)
|