add sanity check on preprocessed output
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10945 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
cd43bd063d
commit
509ee37f55
1 changed files with 5 additions and 1 deletions
|
|
@ -1140,11 +1140,15 @@ int SWIG_main(int argc, char *argv[], Language *l) {
|
|||
}
|
||||
if (top) {
|
||||
if (!Getattr(top, "name")) {
|
||||
Printf(stderr, "*** No module name specified using %%module or -module.\n");
|
||||
Printf(stderr, "No module name specified using %%module or -module.\n");
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
} else {
|
||||
/* Set some filename information on the object */
|
||||
String *infile = scanner_get_main_input_file();
|
||||
if (!infile) {
|
||||
Printf(stderr, "Missing input file in preprocessed output.\n");
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
Setattr(top, "infile", infile); // Note: if nopreprocess then infile is the original input file, otherwise input_file
|
||||
Setattr(top, "inputfile", input_file);
|
||||
if (!outfile_name) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue