mirror of https://github.com/swig/swig
Fix ODR violations
Detected by compiling with GCC flags `-flto -Wodr`.
This commit is contained in:
parent
45ebd33698
commit
561a1d843d
|
@ -21,6 +21,7 @@
|
|||
String *argv_template_string;
|
||||
String *argc_template_string;
|
||||
|
||||
namespace {
|
||||
struct Overloaded {
|
||||
Node *n; /* Node */
|
||||
int argc; /* Argument count */
|
||||
|
@ -28,6 +29,7 @@ struct Overloaded {
|
|||
int error; /* Ambiguity error */
|
||||
bool implicitconv_function; /* For ordering implicitconv functions*/
|
||||
};
|
||||
}
|
||||
|
||||
static int fast_dispatch_mode = 0;
|
||||
static int cast_dispatch_mode = 0;
|
||||
|
|
|
@ -93,6 +93,7 @@ static int nortti = 0;
|
|||
static int relativeimport = 0;
|
||||
|
||||
/* flags for the make_autodoc function */
|
||||
namespace {
|
||||
enum autodoc_t {
|
||||
AUTODOC_CLASS,
|
||||
AUTODOC_CTOR,
|
||||
|
@ -103,7 +104,7 @@ enum autodoc_t {
|
|||
AUTODOC_CONST,
|
||||
AUTODOC_VAR
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
static const char *usage1 = "\
|
||||
Python Options (available with -python)\n\
|
||||
|
|
|
@ -1301,13 +1301,14 @@ void R::addAccessor(String *memberName, Wrapper *wrapper, String *name,
|
|||
|
||||
#define MAX_OVERLOAD 256
|
||||
|
||||
namespace {
|
||||
struct Overloaded {
|
||||
Node *n; /* Node */
|
||||
int argc; /* Argument count */
|
||||
ParmList *parms; /* Parameters used for overload check */
|
||||
int error; /* Ambiguity error */
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
List * R::Swig_overload_rank(Node *n,
|
||||
bool script_lang_wrapping) {
|
||||
|
|
|
@ -116,6 +116,7 @@ public:
|
|||
|
||||
|
||||
/* flags for the make_autodoc function */
|
||||
namespace {
|
||||
enum autodoc_t {
|
||||
AUTODOC_CLASS,
|
||||
AUTODOC_CTOR,
|
||||
|
@ -127,6 +128,7 @@ enum autodoc_t {
|
|||
AUTODOC_SETTER,
|
||||
AUTODOC_NONE
|
||||
};
|
||||
}
|
||||
|
||||
static const char *usage = "\
|
||||
Ruby Options (available with -ruby)\n\
|
||||
|
|
Loading…
Reference in New Issue