Modify -debug-tags output to use standard file name/line reporting so that editors can easily navigate to the appropriate line

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11811 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2010-01-09 17:20:11 +00:00
commit 5a3ba0d607
2 changed files with 12 additions and 2 deletions

View file

@ -1,6 +1,16 @@
Version 1.3.41 (in progress) Version 1.3.41 (in progress)
============================ ============================
2010-01-10: wsfulton
Modify -debug-tags output to use standard file name/line reporting so that editors
can easily navigate to the appropriate lines.
Was typically:
. top . include . include (/usr/share/swig/temp/trunk/Lib/swig.swg:312)
. top . include . include . include (/usr/share/swig/temp/trunk/Lib/swigwarnings.swg:39)
now:
/usr/share/swig/temp/trunk/Lib/swig.swg:312: . top . include . include
/usr/share/swig/temp/trunk/Lib/swigwarnings.swg:39: . top . include . include . include
2010-01-09: wsfulton 2010-01-09: wsfulton
Slight change to warning, error and diagnostic reporting. The warning number is no Slight change to warning, error and diagnostic reporting. The warning number is no
longer shown within brackets. This is to help default parsing of warning messages by longer shown within brackets. This is to help default parsing of warning messages by

View file

@ -30,7 +30,7 @@ void Swig_print_tags(DOH *obj, DOH *root) {
croot = root; croot = root;
while (obj) { while (obj) {
Printf(stdout, "%s . %s (%s:%d)\n", croot, nodeType(obj), Getfile(obj), Getline(obj)); Swig_diagnostic(Getfile(obj), Getline(obj), "%s . %s\n", croot, nodeType(obj));
cobj = firstChild(obj); cobj = firstChild(obj);
if (cobj) { if (cobj) {
newroot = NewStringf("%s . %s", croot, nodeType(obj)); newroot = NewStringf("%s . %s", croot, nodeType(obj));
@ -268,7 +268,7 @@ void Swig_require(const char *ns, Node *n, ...) {
} }
obj = Getattr(n, name); obj = Getattr(n, name);
if (!opt && !obj) { if (!opt && !obj) {
Printf(stderr, "%s:%d. Fatal error (Swig_require). Missing attribute '%s' in node '%s'.\n", Getfile(n), Getline(n), name, nodeType(n)); Swig_error(Getfile(n), Getline(n), "Fatal error (Swig_require). Missing attribute '%s' in node '%s'.\n", name, nodeType(n));
assert(obj); assert(obj);
} }
if (!obj) if (!obj)