Add missing line and file number for some errors in %fragment declaration
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12941 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
602730a327
commit
eee2a6a2f2
1 changed files with 3 additions and 1 deletions
|
|
@ -60,6 +60,8 @@ void Swig_fragment_register(Node *fragment) {
|
||||||
if (kwargs) {
|
if (kwargs) {
|
||||||
Setmeta(ccode, "kwargs", kwargs);
|
Setmeta(ccode, "kwargs", kwargs);
|
||||||
}
|
}
|
||||||
|
Setfile(ccode, Getfile(fragment));
|
||||||
|
Setline(ccode, Getline(fragment));
|
||||||
Setattr(fragments, name, ccode);
|
Setattr(fragments, name, ccode);
|
||||||
if (debug)
|
if (debug)
|
||||||
Printf(stdout, "registering fragment %s %s\n", name, section);
|
Printf(stdout, "registering fragment %s %s\n", name, section);
|
||||||
|
|
@ -142,7 +144,7 @@ void Swig_fragment_emit(Node *n) {
|
||||||
if (section) {
|
if (section) {
|
||||||
File *f = Swig_filebyname(section);
|
File *f = Swig_filebyname(section);
|
||||||
if (!f) {
|
if (!f) {
|
||||||
Swig_error(Getfile(code), Getline(code), "Bad section '%s' for code fragment '%s'\n", section, name);
|
Swig_error(Getfile(code), Getline(code), "Bad section '%s' in %%fragment declaration for code fragment '%s'\n", section, name);
|
||||||
} else {
|
} else {
|
||||||
if (debug)
|
if (debug)
|
||||||
Printf(stdout, "emitting subfragment %s %s\n", name, section);
|
Printf(stdout, "emitting subfragment %s %s\n", name, section);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue