summaryrefslogtreecommitdiffstats
path: root/src/if_perl.xs
AgeCommit message (Collapse)Author
2024-01-29patch 9.1.0062: Internal error when :luado/perldo/pydo etc delete linesv9.1.0062zeertzjq
Problem: Internal error when :luado/perldo/pydo etc delete lines Solution: Test that the line is still valid line number (zeertzjq) closes: #13931 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-19patch 9.0.2052: win32: using deprecated wsock32 apiv9.0.2052Ken Takata
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: #13383 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-18patch 9.0.2047: perl: warning about inconsistent dll linkagev9.0.2047Ken Takata
Problem: perl: warning about inconsistent dll linkage Solution: suppress warning Suppress warning C4273 (inconsistent DLL linkage). Also adjust inconsistent use of const. closes: #13369 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-11patch 9.0.2013: confusing ifdefs in if_<lang>.cv9.0.2014Ken Takata
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>
2023-09-30patch 9.0.1960: Make CI checks more strictv9.0.1960Yee Cheng Chin
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: #13223 closes: #13226 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-09-01patch 9.0.1835: Perl interface has problems with load PL_current_contextv9.0.1835Yee Cheng Chin
Problem: Perl interface has problems with load PL_current_context Solution: Fix Perl interface to load PL_current_context from library In #12914, 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: #12996 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-08-29patch 9.0.1818: dynamically linking perl is brokenv9.0.1818Christian Brabandt
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: #12827 closes: #12914 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-08-13patch 9.0.1700: Cannot compile with dynamic perl < 5.38v9.0.1700K.Takata
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: #12755 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: K.Takata <kentkt@csc.jp>
2023-08-09patch 9.0.1681: Build Failure with Perl 5.38v9.0.1681Philip H
Problem: Build Failure with Perl 5.38 Solution: Fix Build Failure closes: #12543, closes: #12575
2022-11-28patch 9.0.0965: using one window for executing autocommands is insufficientv9.0.0965Bram Moolenaar
Problem: Using one window for executing autocommands is insufficient. Solution: Use up to five windows for executing autocommands.
2022-11-14patch 9.0.0880: preprocessor indenting is offv9.0.0880K.Takata
Problem: Preprocessor indenting is off. Solution: Adjust preprocessor indentation. (Ken Takata, closes #11546)
2022-11-04patch 9.0.0830: compiling with Perl on Mac 12 failsv9.0.0830Philip H
Problem: Compiling with Perl on Mac 12 fails. Solution: Suppress infinite warnings. (closes #11499)
2022-10-01patch 9.0.0634: evaluating "expr" options has more overhead than neededv9.0.0634Bram Moolenaar
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-09-17patch 9.0.0493: Perl test failsv9.0.0493Bram Moolenaar
Problem: Perl test fails. Solution: Remove remaining FEAT_EVAL.
2022-08-14patch 9.0.0206: redraw flags are not named specificallyv9.0.0206Bram Moolenaar
Problem: Redraw flags are not named specifically. Solution: Prefix "UPD_" to the flags, for UPDate_screen().
2022-05-10patch 8.2.4931: Crash with sequence of Perl commandsv8.2.4931Bram Moolenaar
Problem: Crash with sequence of Perl commands. Solution: Move PUTBACK to another line. (closes #10386)
2022-01-28patch 8.2.4246: one error message not in errors.hv8.2.4246Bram Moolenaar
Problem: One error message not in errors.h. (Antonio Colombo) Solution: Move the message and rename.
2022-01-01patch 8.2.3967: error messages are spread outv8.2.3967Bram Moolenaar
Problem: Error messages are spread out. Solution: Move more errors to errors.h.
2021-07-24patch 8.2.3208: dynamic library load error does not mention why it failedv8.2.3208Martin Tournoij
Problem: Dynamic library load error does not mention why it failed. Solution: Add the error message. (Martin Tournoij, closes #8621)
2021-05-27patch 8.2.2891: cannot build with Perl 5.34v8.2.2891ichizok
Problem: Cannot build with Perl 5.34. Solution: Add Perl_SvTRUE_common(). (Ozaki Kiichi, closes #8266, closes #8250)
2020-10-31patch 8.2.1929: MS-Windows: problem loading Perl 5.32v8.2.1929Bram Moolenaar
Problem: MS-Windows: problem loading Perl 5.32. Solution: Define NO_THREAD_SAFE_LOCALE. (Ken Takata, closes #7234)
2020-09-10patch 8.2.1655: cannot build with Strawberry Perl 5.32.0v8.2.1655Bram Moolenaar
Problem: Cannot build with Strawberry Perl 5.32.0. Solution: Use Perl_sv_2pvbyte_flags. (closes #6921)
2020-06-24patch 8.2.1049: Vim9: leaking memory when using continuation linev8.2.1049Bram Moolenaar
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-21patch 8.2.1031: build failure with Perl5.32v8.2.1031Bram Moolenaar
Problem: Build failure with Perl5.32. Solution: Define a few more functions. (Felix Yan, closes #6310)
2020-06-12patch 8.2.0967: unnecessary type casts for vim_strnsave()v8.2.0967Bram Moolenaar
Problem: Unnecessary type casts for vim_strnsave(). Solution: Remove the type casts.
2020-05-30patch 8.2.0853: ml_delete() often called with FALSE argumentv8.2.0853Bram Moolenaar
Problem: ml_delete() often called with FALSE argument. Solution: Use ml_delete_flags(x, ML_DEL_MESSAGE) when argument is TRUE.
2020-04-11patch 8.2.0541: Travis CI does not give compiler warningsv8.2.0541Bram Moolenaar
Problem: Travis CI does not give compiler warnings. Solution: Add flags for warnings. Fix uncovered problems. (Ozaki Kiichi, closes #5898)
2020-03-29patch 8.2.0479: unloading shared libraries on exit has no purposev8.2.0479Bram Moolenaar
Problem: Unloading shared libraries on exit has no purpose. Solution: Do not unload shared libraries on exit.
2020-01-26patch 8.2.0156: various typos in source files and testsv8.2.0156Bram Moolenaar
Problem: Various typos in source files and tests. Solution: Fix the typos. (Emir Sari, closes #5532)
2020-01-06patch 8.2.0094: MS-Windows: cannot build with Strawberry Perl 5.30v8.2.0094Bram Moolenaar
Problem: MS-Windows: cannot build with Strawberry Perl 5.30. Solution: Define __builtin_expect() as a workaround. (Ken Takata, closes #5267)
2019-02-23patch 8.1.0978: blob not tested with Perlv8.1.0978Bram Moolenaar
Problem: Blob not tested with Perl. Solution: Add more test coverage. Fixes a crash. (Dominique Pelle, closes #4037)
2019-02-17patch 8.1.0941: macros for MS-Windows are inconsistentv8.1.0941Bram Moolenaar
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)
2019-02-08patch 8.1.0881: can execute shell commands in rvim through interfacesv8.1.0881Bram Moolenaar
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-01-19patch 8.1.0779: argument for message functions is inconsistentv8.1.0779Bram Moolenaar
Problem: Argument for message functions is inconsistent. Solution: Make first argument to msg() "char *".
2019-01-13patch 8.1.0744: compiler warnings for signed/unsigned stringsv8.1.0744Bram Moolenaar
Problem: Compiler warnings for signed/unsigned strings. Solution: A few more type cast fixes.
2019-01-13patch 8.1.0743: giving error messages is not flexiblev8.1.0743Bram Moolenaar
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.
2019-01-12patch 8.1.0735: cannot handle binary datav8.1.0735Bram Moolenaar
Problem: Cannot handle binary data. Solution: Add the Blob type. (Yasuhiro Matsumoto, closes #3638)
2018-09-21patch 8.1.0420: generating vim.lib when using ActivePerl 5.20.3 or laterv8.1.0420Bram Moolenaar
Problem: Generating vim.lib when using ActivePerl 5.20.3 or later. Solution: Redefine XS_EXTERNAL(). (Ken Takata, closes #3462)
2018-08-02patch 8.1.0234: incorrect reference counting in Perl interfacev8.1.0234Bram Moolenaar
Problem: Incorrect reference counting in Perl interface. Solution: Call SvREFCNT_inc more often, add a test. (Damien)
2018-07-25patch 8.1.0212: preferred cursor column not set in interfacesv8.1.0212Bram Moolenaar
Problem: Preferred cursor column not set in interfaces. Solution: Set w_set_curswant when setting the cursor. (David Hotham, closes #3060)
2018-07-22patch 8.1.0203: building with Perl 5.28 fails on Windowsv8.1.0203Bram Moolenaar
Problem: Building with Perl 5.28 fails on Windows. Solution: Define Perl_mg_get. (closes #3196)
2018-07-16patch 8.1.0190: Perl refcounts are wrongv8.1.0190Bram Moolenaar
Problem: Perl refcounts are wrong. Solution: Improve refcounting. Add a test. (Damien)
2018-07-08patch 8.1.0167: lock flag in new dictitem is reset in many placesv8.1.0167Bram Moolenaar
Problem: Lock flag in new dictitem is reset in many places. Solution: Always reset the lock flag.
2018-03-06patch 8.0.1576: Perl VIM::Buffers() does not find every bufferv8.0.1576Bram Moolenaar
Problem: Perl VIM::Buffers() does not find every buffer. Solution: Also find unlisted buffer by number or name. (Chris Weyl, closes #2692)
2017-10-24patch 8.0.1215: newer gcc warns for implicit fallthroughv8.0.1215Bram Moolenaar
Problem: Newer gcc warns for implicit fallthrough. Solution: Consistently use a FALLTHROUGH comment. (Christian Brabandt)
2017-09-25patch 8.0.1145: warning when compiling with Perlv8.0.1145Bram Moolenaar
Problem: Warning when compiling with Perl. Solution: Remove unused variable. (Ken Takata0
2017-09-17patch 8.0.1123: cannot define a toolbar for a windowv8.0.1123Bram Moolenaar
Problem: Cannot define a toolbar for a window. Solution: Add a window-local toolbar.
2017-09-16patch 8.0.1118: FEAT_WINDOWS adds a lot of #ifdefsv8.0.1118Bram Moolenaar
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-06-10patch 8.0.0631: can't build with Perl 5.26v8.0.0631Bram Moolenaar
Problem: Perl 5.26 also needs S_TOPMARK and S_POPMARK defined. Solution: Define the functions when needed. (Jesin, closes #1748)
2017-04-30patch 8.0.0593: duplication of code for adding a list or dict return valuev8.0.0593Bram Moolenaar
Problem: Duplication of code for adding a list or dict return value. Solution: Add rettv_dict_set() and rettv_list_set(). (Yegappan Lakshmanan)