From b24665fa6aeaccd6690f09682d533e4180611b1d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 22 Apr 2016 19:10:13 +0200 Subject: [PATCH] Add names of the functions being wrapped to symbol table At the very least this results in clear error messages when running SWIG if the symbol is encountered twice instead of errors given only when compiling the generated code later. --- Source/Modules/c.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Modules/c.cxx b/Source/Modules/c.cxx index e9d8f10ec..0a1d549db 100644 --- a/Source/Modules/c.cxx +++ b/Source/Modules/c.cxx @@ -1152,6 +1152,10 @@ ready: * ---------------------------------------------------------------------- */ virtual int functionWrapper(Node *n) { + if (!Getattr(n, "sym:overloaded")) { + if (!addSymbol(Getattr(n, "sym:name"), n)) + return SWIG_ERROR; + } if (CPlusPlus) { functionWrapperCPPSpecific(n);