diff options
| author | Lindley French <lindleyf@google.com> | 2015-05-07 11:29:47 -0700 |
|---|---|---|
| committer | Lindley French <lindleyf@google.com> | 2015-05-07 11:29:47 -0700 |
| commit | 8f19d77fecd00fbae883d7c45d7873af0da2b643 (patch) | |
| tree | 4328f76d37133246269208df3512fe730cb28676 /Source/Modules | |
| parent | 159b3c7958c80b7965a35768f6347b83d9e5ccd8 (diff) | |
| download | swig-8f19d77fecd00fbae883d7c45d7873af0da2b643.tar.gz | |
Don't include an STL header in SWIG.
Diffstat (limited to 'Source/Modules')
| -rw-r--r-- | Source/Modules/java.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/Modules/java.cxx b/Source/Modules/java.cxx index ddd8570f5..69b1bd74e 100644 --- a/Source/Modules/java.cxx +++ b/Source/Modules/java.cxx @@ -435,7 +435,6 @@ public: Printf(f_directors_h, "\n"); Printf(f_directors_h, "#ifndef SWIG_%s_WRAP_H_\n", module_class_name); Printf(f_directors_h, "#define SWIG_%s_WRAP_H_\n\n", module_class_name); - Printf(f_directors_h, "#include <bitset>\n"); Printf(f_directors, "\n\n"); Printf(f_directors, "/* ---------------------------------------------------\n"); @@ -4484,13 +4483,19 @@ public: int n_methods = curr_class_dmethod - first_class_dmethod; if (n_methods) { - /* Emit the swig_overrides() method and the swig_override bitset */ + /* Emit the swig_overrides() method and the swig_override array */ Printf(f_directors_h, "public:\n"); Printf(f_directors_h, " bool swig_overrides(int n) {\n"); Printf(f_directors_h, " return (n < %d ? swig_override[n] : false);\n", n_methods); Printf(f_directors_h, " }\n"); Printf(f_directors_h, "protected:\n"); - Printf(f_directors_h, " std::bitset<%d> swig_override;\n", n_methods); + Printf(f_directors_h, " struct ZeroedBoolArray {\n"); + Printf(f_directors_h, " bool array[%d];\n", n_methods); + Printf(f_directors_h, " ZeroedBoolArray() { memset(array, sizeof(array), 0); }\n"); + Printf(f_directors_h, " bool& operator[](int n) { return array[n]; }\n"); + Printf(f_directors_h, " bool operator[](int n) const { return array[n]; }\n"); + Printf(f_directors_h, " };\n"); + Printf(f_directors_h, " ZeroedBoolArray swig_override;\n"); /* Emit the code to look up the class's methods, initialize the override array */ |
