Tcl fix when using -Wmissing-field-initializers warnings
Only fixed for Tcl >= 8.5 as prior to this version the Tcl_HashTable structure changed a few times.
This commit is contained in:
parent
6a61f8271f
commit
e917636575
2 changed files with 7 additions and 1 deletions
|
|
@ -67,6 +67,12 @@
|
||||||
#define SWIG_GetConstant SWIG_GetConstantObj
|
#define SWIG_GetConstant SWIG_GetConstantObj
|
||||||
#define SWIG_Tcl_GetConstant SWIG_Tcl_GetConstantObj
|
#define SWIG_Tcl_GetConstant SWIG_Tcl_GetConstantObj
|
||||||
|
|
||||||
|
#if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 5
|
||||||
|
#define SWIG_TCL_HASHTABLE_INIT {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||||
|
#else
|
||||||
|
#define SWIG_TCL_HASHTABLE_INIT {0}
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "assert.h"
|
#include "assert.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
||||||
|
|
@ -968,7 +968,7 @@ public:
|
||||||
Printf(f_wrappers, ",0");
|
Printf(f_wrappers, ",0");
|
||||||
}
|
}
|
||||||
Printv(f_wrappers, ", swig_", mangled_classname, "_methods, swig_", mangled_classname, "_attributes, swig_", mangled_classname, "_bases,",
|
Printv(f_wrappers, ", swig_", mangled_classname, "_methods, swig_", mangled_classname, "_attributes, swig_", mangled_classname, "_bases,",
|
||||||
"swig_", mangled_classname, "_base_names, &swig_module };\n", NIL);
|
"swig_", mangled_classname, "_base_names, &swig_module, SWIG_TCL_HASHTABLE_INIT };\n", NIL);
|
||||||
|
|
||||||
if (!itcl) {
|
if (!itcl) {
|
||||||
Printv(cmd_tab, tab4, "{ SWIG_prefix \"", class_name, "\", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_", mangled_classname,
|
Printv(cmd_tab, tab4, "{ SWIG_prefix \"", class_name, "\", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_", mangled_classname,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue