Remove unused SWIGPROTECT

It doesn't make any sense to use protected visibility for the symbols in the
proxy code, the only use for it would be if it could be applied to the
original functions being wrapped, to prevent them from being shadowed by the
proxy versions, but this cannot be done, in general.

Apparently this was already understood as the code using SWIGPROTECT was
commented out, but ef85d0d43f didn't give any
reason for doing this, nor for leaving this code.

Assume there was none and just remove it completely now to avoid confusion.
This commit is contained in:
Vadim Zeitlin 2016-04-09 18:08:38 +02:00
commit 6bbe375a37
2 changed files with 0 additions and 28 deletions

View file

@ -17,16 +17,3 @@
# endif
# endif
#endif
#ifndef SWIGPROTECT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) || defined(__APPLE__)
# define SWIGPROTECT(x)
# else
# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
# define SWIGPROTECT(x) __attribute__ ((visibility("protected"))) x
# else
# define SWIGPROTECT(x)
# endif
# endif
#endif

View file

@ -686,13 +686,6 @@ ready:
// print the call of the wrapper function
Printv(f_proxy_code_body, " return ", wname, "(", arg_names, ");\n}\n", NIL);
/*
// add visibility hint for the compiler (do not override this symbol)
String *vis_hint = NewString("");
Printv(vis_hint, "SWIGPROTECT(", return_type, " ", name, "(", proto, ");)\n\n", NIL);
Printv(f_proxy_header, vis_hint, NIL);
Delete(vis_hint);
*/
// add function declaration to the proxy header file
Printv(f_proxy_header, return_type, " ", name, "(", proto, ");\n\n", NIL);
@ -1010,14 +1003,6 @@ ready:
Printv(f_proxy_code_body, " return ", wrapper_call, ";\n}\n", NIL);
// add function declaration to the proxy header file
/*
// add visibility hint for the compiler (do not override this symbol)
String *vis_hint = NewString("");
Printv(vis_hint, "SWIGPROTECT(", preturn_type, " ", name, "(", pproto, ");)\n\n", NIL);
Printv(f_proxy_header, vis_hint, NIL);
Delete(vis_hint);
*/
Printv(f_proxy_header, preturn_type, " ", name, "(", pproto, ");\n\n", NIL);
// cleanup