1
0
Fork 0
mirror of https://github.com/vim/vim synced 2025-04-16 22:56:12 +02:00
Commit graph

117 commits

Author SHA1 Message Date
zeertzjq
e99f068878
patch 9.1.0062: Internal error when :luado/perldo/pydo etc delete lines
Problem:  Internal error when :luado/perldo/pydo etc delete lines
Solution: Test that the line is still valid line number
          (zeertzjq)

closes: 

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-29 19:32:39 +01:00
Ken Takata
c6944913f0
patch 9.0.2052: win32: using deprecated wsock32 api
Problem:  win32: using deprecated wsock32 api
Solution: Use winsock2 (ws2_32) consistently

win32: Stop using wsock32

We have already used ws2_32 (winsock2) and already dropped support for
Windows 95 and NT4.  So, we don't need to care about wsock32.

Use ws2_32 consistently.

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-19 17:24:02 +02:00
Ken Takata
2b126a6892
patch 9.0.2047: perl: warning about inconsistent dll linkage
Problem:  perl: warning about inconsistent dll linkage
Solution: suppress warning

Suppress warning C4273 (inconsistent DLL linkage).

Also adjust inconsistent use of const.

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-18 11:59:44 +02:00
Ken Takata
c97b3febc8
patch 9.0.2013: confusing ifdefs in if_<lang>.c
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: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-11 21:27:06 +02:00
Yee Cheng Chin
f7f746b167
patch 9.0.1960: Make CI checks more strict
Problem:  Make CI checks more strict
Solution: Add -Wstrict-prototypes -Wmissing-prototypes to CI,
          fix uncovered problems

Add -Wstrict-prototypes -Wmissing-prototypes warnings check to CI

Add two new warnings to CI, silence some Perl related build-warnings:

- `strict-prototypes` helps prevent declaring a function with an empty
  argument list, e.g. `int func()`. In C++, that's equivalent to `int
  func(void)`, but in C, that means a function that can take any number
  of arguments which is rarely what we want.

- `missing-prototypes` makes sure we use `static` for file-only internal
  functions. Non-static functions should have been declared on a
  prototype file.

- Add `no-compound-token-split-by-macro` to the perl cflags, since it
  throws out a bunch of perl-related warnings that make the CI log
  unnecessary verbose and hard to read. This seems to happen only with
  clang 12 and above.

When applying those changes, it already uncovered a few warnings, so fix
up the code as well (fix prototypes, make the code static, remove
shadowed var declaration)

GTK header needs to have #pragma warning suppressiong because GTK2
headers will warn on `-Wstrict-prototypes`, and it's included by gui.h
and so we can't just turn off the warning in a couple files.

closes: 
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-09-30 12:32:37 +02:00
Yee Cheng Chin
7a9d1aa878
patch 9.0.1835: Perl interface has problems with load PL_current_context
Problem:  Perl interface has problems with load PL_current_context
Solution: Fix Perl interface to load PL_current_context from library

In , in order to fix an issue with Perl 5.36 dynamic builds, (that
version introduced a thread-local `PL_current_context`), the file added
the variable manually so we can satisfy the linker. However, the
variable is a different one from the one in the library, so there could
be unpredictable behavior. Instead, just use `dlsym` to load the context
from the library. The fact that it's thread-local doesn't matter too
much to us because Vim's interface is single-threaded so it will work
properly.

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-09-01 18:46:17 +02:00
Christian Brabandt
55460da26c
patch 9.0.1818: dynamically linking perl is broken
Problem:  dynamically linking perl is broken
Solution: Fix all issues

This is a combination of several commits:

1) Fix if_perl.xs not being able to build on all versions of Perl (5.30)

This fixes the dynamic builds of Perl interface. The Perl interface file
previously had to manually copy and paste misc inline functions verbatim
from the Perl headers, because we defined `PERL_NO_INLINE_FUNCTIONS`
which prevents us form getting some function definitions. The original
reason we defined it was because those inline functions would reference
Perl functions that would cause linkage errors.

This is a little fragile as every time a new version of Perl comes out,
we inevitably have to copy over new versions of inline functions to our
file, and it's also easy to miss updates to existing functions.

Instead, remove the `PERL_NO_INLINE_FUNCTIONS` define, remove the manual
copy-pasted inline functions. Simply add stub implementations of the
missing linked functions like `Perl_sv_free2` and forward them to the
DLL version of the function at runtime. There are only a few functions
that need this treatment, and it's a simple stub so there is very low
upkeep compared to copying whole implementations to the file.

Also, fix the configure script so that if we are using dynamic linkage,
we don't pass `-lperl` to the build flags, to avoid accidental external
linkage while using dynamic builds. This is similar to how Python
integration works.

2) Fix GIMME_V deprecation warnings in Perl 5.38

Just use GIMME_V, and only use GIMME when using 5.30 to avoid needing to
link Perl_block_gimme. We could provide a stub like the other linked
functions like Perl_sv_free2, but simply using GIMME is the simplest and
it has always worked before.

3) Fix Perl 5.38 issues

Fix two issues:

3.1. Perl 5.38 links against more functions in their inline headers, so we
   need to stub them too.

3.2. Perl 5.38 made Perl_get_context an inline function, but *only* for
   non-Windows build. Fix that. Note that this was happening in Vim
   currently, as it would build, but fail to run Perl code at runtime.

4) Fix Perl 5.36/5.38 when thread local is used

Perl 5.36 introduced using `_Thread_local` for the current context,
which causes inline functions to fail. Create a stub
`PL_current_context` thread local variable to satisfy the linker for
inlined functions. Note that this is going to result in a different
`PL_current_context` being used than the one used in the library, but so
far from testing it seems to work.

5) Add docs for how to build Perl for dynamic linking to work

closes: 
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-08-29 21:31:28 +02:00
K.Takata
32f586eec1
patch 9.0.1700: Cannot compile with dynamic perl < 5.38
Problem: Cannot compile with dynamic perl < 5.38 (after 9.0.1681)
Solution: Fix if_perl/dyn from perl 5.32 to 5.38

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: K.Takata <kentkt@csc.jp>
2023-08-13 10:15:05 +02:00
Philip H
1d7caa58e3
patch 9.0.1681: Build Failure with Perl 5.38
Problem: Build Failure with Perl 5.38
Solution: Fix Build Failure

closes: , closes: 
2023-08-09 19:58:58 +02:00
Bram Moolenaar
e76062c078 patch 9.0.0965: using one window for executing autocommands is insufficient
Problem:    Using one window for executing autocommands is insufficient.
Solution:   Use up to five windows for executing autocommands.
2022-11-28 18:51:43 +00:00
K.Takata
161b6ac04f patch 9.0.0880: preprocessor indenting is off
Problem:    Preprocessor indenting is off.
Solution:   Adjust preprocessor indentation. (Ken Takata, closes )
2022-11-14 15:31:07 +00:00
Philip H
5375205761 patch 9.0.0830: compiling with Perl on Mac 12 fails
Problem:    Compiling with Perl on Mac 12 fails.
Solution:   Suppress infinite warnings. (closes )
2022-11-04 22:32:21 +00:00
Bram Moolenaar
a4e0b9785e patch 9.0.0634: evaluating "expr" options has more overhead than needed
Problem:    Evaluating "expr" options has more overhead than needed.
Solution:   Use call_simple_func() for 'foldtext', 'includeexpr', 'printexpr',
            "expr" of 'spellsuggest', 'diffexpr', 'patchexpr', 'balloonexpr',
            'formatexpr', 'indentexpr' and 'charconvert'.
2022-10-01 19:43:52 +01:00
Bram Moolenaar
1e8009e34a patch 9.0.0493: Perl test fails
Problem:    Perl test fails.
Solution:   Remove remaining FEAT_EVAL.
2022-09-17 21:24:49 +01:00
Bram Moolenaar
a4d158b3c8 patch 9.0.0206: redraw flags are not named specifically
Problem:    Redraw flags are not named specifically.
Solution:   Prefix "UPD_" to the flags, for UPDate_screen().
2022-08-14 14:17:45 +01:00
Bram Moolenaar
0f267621c0 patch 8.2.4931: Crash with sequence of Perl commands
Problem:    Crash with sequence of Perl commands.
Solution:   Move PUTBACK to another line. (closes )
2022-05-10 13:32:24 +01:00
Bram Moolenaar
e96eea7b6a patch 8.2.4246: one error message not in errors.h
Problem:    One error message not in errors.h. (Antonio Colombo)
Solution:   Move the message and rename.
2022-01-28 21:00:51 +00:00
Bram Moolenaar
460ae5dfca patch 8.2.3967: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more errors to errors.h.
2022-01-01 14:19:49 +00:00
Martin Tournoij
1a3e5747b7 patch 8.2.3208: dynamic library load error does not mention why it failed
Problem:    Dynamic library load error does not mention why it failed.
Solution:   Add the error message. (Martin Tournoij, closes )
2021-07-24 13:57:29 +02:00
ichizok
543467136f patch 8.2.2891: cannot build with Perl 5.34
Problem:    Cannot build with Perl 5.34.
Solution:   Add Perl_SvTRUE_common(). (Ozaki Kiichi, closes ,
            closes )
2021-05-27 18:05:14 +02:00
Bram Moolenaar
0289065e41 patch 8.2.1929: MS-Windows: problem loading Perl 5.32
Problem:    MS-Windows: problem loading Perl 5.32.
Solution:   Define NO_THREAD_SAFE_LOCALE. (Ken Takata, closes )
2020-10-31 13:05:11 +01:00
Bram Moolenaar
895a7a472d patch 8.2.1655: cannot build with Strawberry Perl 5.32.0
Problem:    Cannot build with Strawberry Perl 5.32.0.
Solution:   Use Perl_sv_2pvbyte_flags. (closes )
2020-09-10 21:36:11 +02:00
Bram Moolenaar
b171fb1790 patch 8.2.1049: Vim9: leaking memory when using continuation line
Problem:    Vim9: leaking memory when using continuation line.
Solution:   Keep a pointer to the continuation line in evalarg_T.  Centralize
            checking for a next command.
2020-06-24 20:34:03 +02:00
Bram Moolenaar
f5433fbfe4 patch 8.2.1031: build failure with Perl5.32
Problem:    Build failure with Perl5.32.
Solution:   Define a few more functions. (Felix Yan, closes )
2020-06-21 20:06:54 +02:00
Bram Moolenaar
71ccd03ee8 patch 8.2.0967: unnecessary type casts for vim_strnsave()
Problem:    Unnecessary type casts for vim_strnsave().
Solution:   Remove the type casts.
2020-06-12 22:59:11 +02:00
Bram Moolenaar
ca70c07b72 patch 8.2.0853: ml_delete() often called with FALSE argument
Problem:    ml_delete() often called with FALSE argument.
Solution:   Use ml_delete_flags(x, ML_DEL_MESSAGE) when argument is TRUE.
2020-05-30 20:30:46 +02:00
Bram Moolenaar
81ea1dfb97 patch 8.2.0541: Travis CI does not give compiler warnings
Problem:    Travis CI does not give compiler warnings.
Solution:   Add flags for warnings.  Fix uncovered problems. (Ozaki Kiichi,
            closes )
2020-04-11 18:01:41 +02:00
Bram Moolenaar
2027973b5b patch 8.2.0479: unloading shared libraries on exit has no purpose
Problem:    Unloading shared libraries on exit has no purpose.
Solution:   Do not unload shared libraries on exit.
2020-03-29 20:51:07 +02:00
Bram Moolenaar
4b96df5a01 patch 8.2.0156: various typos in source files and tests
Problem:    Various typos in source files and tests.
Solution:   Fix the typos. (Emir Sari, closes )
2020-01-26 22:00:26 +01:00
Bram Moolenaar
e73b38f8e1 patch 8.2.0094: MS-Windows: cannot build with Strawberry Perl 5.30
Problem:    MS-Windows: cannot build with Strawberry Perl 5.30.
Solution:   Define __builtin_expect() as a workaround. (Ken Takata,
            closes )
2020-01-06 21:22:09 +01:00
Bram Moolenaar
2472ae81df patch 8.1.0978: blob not tested with Perl
Problem:    Blob not tested with Perl.
Solution:   Add more test coverage.  Fixes a crash. (Dominique Pelle,
            closes )
2019-02-23 15:04:17 +01:00
Bram Moolenaar
4f97475d32 patch 8.1.0941: macros for MS-Windows are inconsistent
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 )
2019-02-17 17:44:42 +01:00
Bram Moolenaar
8c62a08faf patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem:    Can execute shell commands in rvim through interfaces.
Solution:   Disable using interfaces in restricted mode. Allow for writing
            file with writefile(), histadd() and a few others.
2019-02-08 14:34:10 +01:00
Bram Moolenaar
32526b3c18 patch 8.1.0779: argument for message functions is inconsistent
Problem:    Argument for message functions is inconsistent.
Solution:   Make first argument to msg() "char *".
2019-01-19 17:43:09 +01:00
Bram Moolenaar
b1443b480f patch 8.1.0744: compiler warnings for signed/unsigned strings
Problem:    Compiler warnings for signed/unsigned strings.
Solution:   A few more type cast fixes.
2019-01-13 23:51:14 +01:00
Bram Moolenaar
f9e3e09fdc patch 8.1.0743: giving error messages is not flexible
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
            )  Also make emsg() accept a "char *" argument.  Get rid of
            an enormous number of type casts.
2019-01-13 23:38:42 +01:00
Bram Moolenaar
6e5ea8d2a9 patch 8.1.0735: cannot handle binary data
Problem:    Cannot handle binary data.
Solution:   Add the Blob type. (Yasuhiro Matsumoto, closes )
2019-01-12 22:47:31 +01:00
Bram Moolenaar
1f402806b8 patch 8.1.0420: generating vim.lib when using ActivePerl 5.20.3 or later
Problem:    Generating vim.lib when using ActivePerl 5.20.3 or later.
Solution:   Redefine XS_EXTERNAL(). (Ken Takata, closes )
2018-09-21 14:01:27 +02:00
Bram Moolenaar
41c363a315 patch 8.1.0234: incorrect reference counting in Perl interface
Problem:    Incorrect reference counting in Perl interface.
Solution:   Call SvREFCNT_inc more often, add a test. (Damien)
2018-08-02 21:46:51 +02:00
Bram Moolenaar
53901442f3 patch 8.1.0212: preferred cursor column not set in interfaces
Problem:    Preferred cursor column not set in interfaces.
Solution:   Set w_set_curswant when setting the cursor. (David Hotham,
            closes )
2018-07-25 22:02:36 +02:00
Bram Moolenaar
578333b2ec patch 8.1.0203: building with Perl 5.28 fails on Windows
Problem:    Building with Perl 5.28 fails on Windows.
Solution:   Define Perl_mg_get. (closes )
2018-07-22 07:31:09 +02:00
Bram Moolenaar
18c4f1badb patch 8.1.0190: Perl refcounts are wrong
Problem:    Perl refcounts are wrong.
Solution:   Improve refcounting.  Add a test. (Damien)
2018-07-16 17:45:38 +02:00
Bram Moolenaar
c89d4b3530 patch 8.1.0167: lock flag in new dictitem is reset in many places
Problem:    Lock flag in new dictitem is reset in many places.
Solution:   Always reset the lock flag.
2018-07-08 17:19:02 +02:00
Bram Moolenaar
16896a1019 patch 8.0.1576: Perl VIM::Buffers() does not find every buffer
Problem:    Perl VIM::Buffers() does not find every buffer.
Solution:   Also find unlisted buffer by number or name. (Chris Weyl,
            closes )
2018-03-06 12:25:56 +01:00
Bram Moolenaar
2f40d129bf patch 8.0.1215: newer gcc warns for implicit fallthrough
Problem:    Newer gcc warns for implicit fallthrough.
Solution:   Consistently use a FALLTHROUGH comment. (Christian Brabandt)
2017-10-24 21:49:36 +02:00
Bram Moolenaar
0c6a32963d patch 8.0.1145: warning when compiling with Perl
Problem:    Warning when compiling with Perl.
Solution:   Remove unused variable. (Ken Takata0
2017-09-25 22:02:32 +02:00
Bram Moolenaar
1b9645de3c patch 8.0.1123: cannot define a toolbar for a window
Problem:    Cannot define a toolbar for a window.
Solution:   Add a window-local toolbar.
2017-09-17 23:03:31 +02:00
Bram Moolenaar
4033c55eca patch 8.0.1118: FEAT_WINDOWS adds a lot of #ifdefs
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.
2017-09-16 20:54:51 +02:00
Bram Moolenaar
fa4161cb0c patch 8.0.0631: can't build with Perl 5.26
Problem:    Perl 5.26 also needs S_TOPMARK and S_POPMARK defined.
Solution:   Define the functions when needed. (Jesin, closes )
2017-06-10 15:46:23 +02:00
Bram Moolenaar
45cf6e910c patch 8.0.0593: duplication of code for adding a list or dict return value
Problem:    Duplication of code for adding a list or dict return value.
Solution:   Add rettv_dict_set() and rettv_list_set(). (Yegappan Lakshmanan)
2017-04-30 20:25:19 +02:00