mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
define_module(): Check the module type for validity before using.
This reflects the changes made in ../texinputs/python.sty.
This commit is contained in:
parent
66823029a4
commit
3e4c614c16
1 changed files with 6 additions and 0 deletions
|
@ -493,6 +493,12 @@ $THIS_CLASS = '';
|
|||
sub define_module{
|
||||
my($word,$name) = @_;
|
||||
my $section_tag = join('', @curr_sec_id);
|
||||
if ($word ne "built-in" && $word ne "extension"
|
||||
&& $word ne "standard" && $word ne "") {
|
||||
write_warnings("Bad module type '$word'"
|
||||
. " for \\declaremodule (module $name)");
|
||||
$word = "";
|
||||
}
|
||||
$word = "$word " if $word;
|
||||
$THIS_MODULE = "$name";
|
||||
$INDEX_SUBITEM = "(in $name)";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue