* gjavah.c (decompile_method): Don't decompile to `return this'
for static methods.
From-SVN: r47804
2001-12-08 Tom Tromey <tromey@redhat.com>
+ * gjavah.c (decompile_method): Don't decompile to `return this'
+ for static methods.
+
* gjavah.c (cxx_keywords): Re-sorted.
* lex.c (cxx_keywords): Re-sorted.
}
else if (code_len == 2
&& codes[0] == OPCODE_aload_0
- && codes[1] == OPCODE_areturn)
+ && codes[1] == OPCODE_areturn
+ /* We're going to generate `return this'. This only makes
+ sense for non-static methods. */
+ && ! (method_access & ACC_STATIC))
{
decompile_return_statement (out, jcf, method_signature, -1,
JPOOL_USHORT1 (jcf, jcf->this_class));