Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3e4c614

Browse files
committed
define_module(): Check the module type for validity before using.
This reflects the changes made in ../texinputs/python.sty.
1 parent 6682302 commit 3e4c614

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Doc/perl/python.perl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,12 @@ sub make_mod_index_entry{
493493
sub define_module{
494494
my($word,$name) = @_;
495495
my $section_tag = join('', @curr_sec_id);
496+
if ($word ne "built-in" && $word ne "extension"
497+
&& $word ne "standard" && $word ne "") {
498+
write_warnings("Bad module type '$word'"
499+
. " for \\declaremodule (module $name)");
500+
$word = "";
501+
}
496502
$word = "$word " if $word;
497503
$THIS_MODULE = "$name";
498504
$INDEX_SUBITEM = "(in $name)";

0 commit comments

Comments
 (0)