You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Start Borland Developer Studio 2006
2. Create Project, add superobject.pas and superxmlparser.pas
3. Use it in the source, like
TSuperObject *obj = new TSuperObject(__classid(TSuperObject));
What is the expected output? What do you see instead?
Expected: Compiling without problems.
Instead: Compile error, missing close bracket ")".
What version of the product are you using? On what operating system?
BDS2006, Windows Vista Business, 32bit.
Please provide any additional information below.
The problem happens due to "wrong" conversion/creation of the
superobject.hpp file which is auto-created due to compilation.
The problematic code happens here when the word "this" is used:
------------------------------------------------------------------
/* class method */ static _di_ISuperObject __fastcall
ParseString(TMetaClass* vmt, WideChar * s, bool strict, bool partial =
true, const _di_ISuperObject thisIsMe = (void *)(0x0), TSuperFindOptions
options = Set<TSuperFindOption, foCreatePath, foCallMethod> () , const
_di_ISuperObject put = (void *)(0x0), TSuperType dt = (TSuperType)(0x0));
/* class method */ static _di_ISuperObject __fastcall
ParseStream(TMetaClass* vmt, Classes::TStream* stream, bool strict, bool
partial = true, const _di_ISuperObject thisIsMe = (void *)(0x0),
TSuperFindOptions options = Set<TSuperFindOption, foCreatePath,
foCallMethod> () , const _di_ISuperObject put = (void *)(0x0), TSuperType
dt = (TSuperType)(0x0));
/* class method */ static _di_ISuperObject __fastcall
ParseFile(TMetaClass* vmt, const AnsiString FileName, bool strict, bool
partial = true, const _di_ISuperObject thisIsMe = (void *)(0x0),
TSuperFindOptions options = Set<TSuperFindOption, foCreatePath,
foCallMethod> () , const _di_ISuperObject put = (void *)(0x0), TSuperType
dt = (TSuperType)(0x0));
/* class method */ static _di_ISuperObject __fastcall
ParseEx(TMetaClass* vmt, TSuperTokenizer* tok, WideChar * str, int len,
bool strict, const _di_ISuperObject thisIsMe = (void *)(0x0),
TSuperFindOptions options = Set<TSuperFindOption, foCreatePath,
foCallMethod> () , const _di_ISuperObject put = (void *)(0x0), TSuperType
dt = (TSuperType)(0x0));
---------------------------------------
Search for:
const _di_ISuperObject this = (void *)(0x0)
in the lines.
That stuff brakes compilation. Possible reason: "this" is a reserved
keyword in c++.
Please rename every word "this" to something different, like "thisIsMe" or
something like that. I tried that for the 4 functions ParseString,
ParseStream, ParseFile and ParseEx.
I attached a "fixed" Version which compiles also on BDS2006/C++ Builder.
Original issue reported on code.google.com by terminar on 27 May 2010 at 5:44
Original issue reported on code.google.com by
terminar
on 27 May 2010 at 5:44Attachments:
The text was updated successfully, but these errors were encountered: