Fix ODR violations

Detected by compiling with GCC flags `-flto -Wodr`.
This commit is contained in:
Olly Betts 2021-09-20 15:04:51 +12:00
parent 45ebd33698
commit 561a1d843d
4 changed files with 8 additions and 2 deletions

View File

@ -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;

View File

@ -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\

View File

@ -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) {

View File

@ -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\