Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile with BDS2006 brings trouble due to wrong header conversion (Keyword "this" is used in source) #10

Open
GoogleCodeExporter opened this issue Jun 22, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

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

Attachments:

@GoogleCodeExporter
Copy link
Author

please help with BC++ please example in BC++

thank you

Original comment by [email protected] on 7 Apr 2011 at 11:20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant