diff options
| -rw-r--r-- | CHANGES | 3 | ||||
| -rw-r--r-- | fluid/Fl_Function_Type.cxx | 11 |
2 files changed, 14 insertions, 0 deletions
@@ -1,5 +1,8 @@ CHANGES IN FLTK 1.1.8 + - In Fluid, declarations starting with the keyword + 'typedef', 'class', or 'struct' are now treated + correctly if inside a class (STR #1283) - Tabs now show the correct tooltip (STR #1282) - Included fltk.spec in configure.in (STR #1274) - Fixed insufficiently invalidated cache diff --git a/fluid/Fl_Function_Type.cxx b/fluid/Fl_Function_Type.cxx index b8a98ebc4..1cf709dea 100644 --- a/fluid/Fl_Function_Type.cxx +++ b/fluid/Fl_Function_Type.cxx @@ -574,6 +574,17 @@ Fl_Decl_Type Fl_Decl_type; void Fl_Decl_Type::write_code1() { const char* c = name(); if (!c) return; + // handle a few keywords differently if inside a class + if (is_in_class() && ( + !strncmp(c,"class",5) && isspace(c[5]) + || !strncmp(c,"typedef",7) && isspace(c[7]) + || !strncmp(c,"FL_EXPORT",9) && isspace(c[9]) + || !strncmp(c,"struct",6) && isspace(c[6]) + ) ) { + write_public(public_); + write_h(" %s\n", c); + return; + } // handle putting #include, extern, using or typedef into decl: if (!isalpha(*c) && *c != '~' || !strncmp(c,"extern",6) && isspace(c[6]) |
