Board index » cppbuilder » hpp generation bug in BDS?

hpp generation bug in BDS?


2006-08-30 01:16:31 AM
cppbuilder100
Hi,
Given the following line in Delphi:
procedure StartTransactionWith(const aTables : array of TnxTable;
aSnapShot : Boolean = False);
BCB6 generates the following HPP:
void __fastcall StartTransactionWith(const TnxTable* * aTables, const int
aTables_Size, bool aSnapShot = false);
but BDS generates:
void __fastcall StartTransactionWith(TnxTable* const * aTables, const int
aTables_Size, bool aSnapShot = false);
I can use a cast to eliminate the compiler error that I get when trying to
use the resulting HPP, but surely one is correct and the other wrong. The
question is, which is which?
- Dennis
 
 

Re:hpp generation bug in BDS?

Dennis Jones wrote:
Quote
I can use a cast to eliminate the compiler error that I get when trying to
use the resulting HPP, but surely one is correct and the other wrong. The
question is, which is which?
BDS is I guess, as it is aTables that is constant in Delphi, not what it
"points" to.
Anyway, using the const specifier with pointer parameters is a recipe
for disaster in BCB/BDS, so I would recommend not using it to begin
with. See QC 7224 for another one.
--
Olivier Sannier
JVCL Coordinator
jvcl.sf.net/
Find more about me on LinkedIn:
https://www.linkedin.com/in/obones
 

Re:hpp generation bug in BDS?

"OBones" < XXXX@XXXXX.COM >wrote in message
Quote
Dennis Jones wrote:

>I can use a cast to eliminate the compiler error that I get when trying
>to use the resulting HPP, but surely one is correct and the other wrong.
>The question is, which is which?

BDS is I guess, as it is aTables that is constant in Delphi, not what it
"points" to.
Anyway, using the const specifier with pointer parameters is a recipe for
disaster in BCB/BDS, so I would recommend not using it to begin with. See
QC 7224 for another one.
Unfortunately, it's not up to me to change...it's a third party library
(NexusDB).
- Dennis
 

{smallsort}