Mercurial > vim
comparison src/if_perl.xs @ 27436:4c683d6c0a9d v8.2.4246
patch 8.2.4246: one error message not in errors.h
Commit: https://github.com/vim/vim/commit/e96eea7b6a56bc7c12e062e90b2e816ff61e705c
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jan 28 21:00:51 2022 +0000
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 28 Jan 2022 22:15:03 +0100 |
parents | 06a137af96f8 |
children | d26a95a16ce1 |
comparison
equal
deleted
inserted
replaced
27435:38c472afefd4 | 27436:4c683d6c0a9d |
---|---|
1028 } | 1028 } |
1029 | 1029 |
1030 #ifdef DYNAMIC_PERL | 1030 #ifdef DYNAMIC_PERL |
1031 static char *e_noperl = N_("Sorry, this command is disabled: the Perl library could not be loaded."); | 1031 static char *e_noperl = N_("Sorry, this command is disabled: the Perl library could not be loaded."); |
1032 #endif | 1032 #endif |
1033 static char *e_perlsandbox = N_("E299: Perl evaluation forbidden in sandbox without the Safe module"); | |
1034 | 1033 |
1035 /* | 1034 /* |
1036 * ":perl" | 1035 * ":perl" |
1037 */ | 1036 */ |
1038 void | 1037 void |
1082 if (sandbox || secure) | 1081 if (sandbox || secure) |
1083 { | 1082 { |
1084 safe = perl_get_sv("VIM::safe", FALSE); | 1083 safe = perl_get_sv("VIM::safe", FALSE); |
1085 # ifndef MAKE_TEST /* avoid a warning for unreachable code */ | 1084 # ifndef MAKE_TEST /* avoid a warning for unreachable code */ |
1086 if (safe == NULL || !SvTRUE(safe)) | 1085 if (safe == NULL || !SvTRUE(safe)) |
1087 emsg(_(e_perlsandbox)); | 1086 emsg(_(e_perl_evaluation_forbidden_in_sandbox_without_safe_module)); |
1088 else | 1087 else |
1089 # endif | 1088 # endif |
1090 { | 1089 { |
1091 PUSHMARK(SP); | 1090 PUSHMARK(SP); |
1092 XPUSHs(safe); | 1091 XPUSHs(safe); |
1359 if (sandbox || secure) | 1358 if (sandbox || secure) |
1360 { | 1359 { |
1361 safe = get_sv("VIM::safe", FALSE); | 1360 safe = get_sv("VIM::safe", FALSE); |
1362 # ifndef MAKE_TEST /* avoid a warning for unreachable code */ | 1361 # ifndef MAKE_TEST /* avoid a warning for unreachable code */ |
1363 if (safe == NULL || !SvTRUE(safe)) | 1362 if (safe == NULL || !SvTRUE(safe)) |
1364 emsg(_(e_perlsandbox)); | 1363 emsg(_(e_perl_evaluation_forbidden_in_sandbox_without_safe_module)); |
1365 else | 1364 else |
1366 # endif | 1365 # endif |
1367 { | 1366 { |
1368 sv = newSVpv((char *)str, 0); | 1367 sv = newSVpv((char *)str, 0); |
1369 PUSHMARK(SP); | 1368 PUSHMARK(SP); |