Add comment with SWIG file name in files generated for Go.
This commit is contained in:
parent
fb103f8db4
commit
4cf5de797f
2 changed files with 14 additions and 0 deletions
|
|
@ -5,6 +5,10 @@ See the RELEASENOTES file for a summary of changes in each release.
|
|||
Version 3.0.0 (in progress)
|
||||
============================
|
||||
|
||||
2013-12-13: iant
|
||||
[Go] Add SWIG source file name as comments in generated
|
||||
files. This can be used by Go documentation tools.
|
||||
|
||||
2013-12-12: jleveque
|
||||
[Lua] Fix typo (wchar instead of wchar_t) which made wchar.i
|
||||
for Lua useless.
|
||||
|
|
|
|||
|
|
@ -281,6 +281,7 @@ private:
|
|||
|
||||
// Get filenames.
|
||||
|
||||
String *swig_filename = Getattr(n, "infile");
|
||||
String *c_filename = Getattr(n, "outfile");
|
||||
String *c_filename_h = Getattr(n, "outfile_h");
|
||||
|
||||
|
|
@ -360,6 +361,11 @@ private:
|
|||
}
|
||||
|
||||
Swig_banner(f_c_begin);
|
||||
if (CPlusPlus) {
|
||||
Printf(f_c_begin, "\n// source: %s\n\n", swig_filename);
|
||||
} else {
|
||||
Printf(f_c_begin, "\n/* source: %s */\n\n", swig_filename);
|
||||
}
|
||||
|
||||
Printf(f_c_runtime, "#define SWIGMODULE %s\n", module);
|
||||
|
||||
|
|
@ -367,6 +373,8 @@ private:
|
|||
Printf(f_c_runtime, "#define SWIG_DIRECTORS\n");
|
||||
|
||||
Swig_banner(f_c_directors_h);
|
||||
Printf(f_c_directors_h, "\n// source: %s\n\n", swig_filename);
|
||||
|
||||
Printf(f_c_directors_h, "#ifndef SWIG_%s_WRAP_H_\n", module);
|
||||
Printf(f_c_directors_h, "#define SWIG_%s_WRAP_H_\n\n", module);
|
||||
|
||||
|
|
@ -377,9 +385,11 @@ private:
|
|||
}
|
||||
|
||||
Swig_banner(f_go_begin);
|
||||
Printf(f_go_begin, "\n// source: %s\n", swig_filename);
|
||||
|
||||
if (!gccgo_flag) {
|
||||
Swig_banner(f_gc_begin);
|
||||
Printf(f_gc_begin, "\n/* source: %s */\n\n", swig_filename);
|
||||
Printf(f_gc_begin, "\n/* This file should be compiled with 6c/8c. */\n");
|
||||
Printf(f_gc_begin, "#pragma dynimport _ _ \"%s\"\n", soname);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue