On Tue, 15 Sep 2009, Alex Strickland wrote:

Hi,

>> If you see such things in the code then it only means that author wanted
>> to create sth but didn't know how and created dummy code which was never
>> executed and it was not even possible to execute it explicitly from .prg
>> code. It also suggests that other parts of such code should be carefully
>> checked.
> I have made a change to ensure the initialisation works correctly. You are 
> right that I did not test that part, it seemed a no-brainer as all it was 
> doing was ensuring that invalid ports will be picked up, and I didn't try 
> an invalid port.
> As for the rest I have used it for a few years and I think that while far 
> from perfect it is usable. The other new parts are working for me.

I know. The whole win_com code looks really nice and thank you for your
great contribution.
My above text was simply too aggressive voice against HB_FUNC_INIT()/
HB_FUNC_EXIT() macro usage, sorry. Few times in the past I was trying
to explain that these macros are used to create unique function names
which do not create collisions with with normal function names and they
never convert C functions into self executing init/exit code but the
problem was systematically  returning and developers did not use to
check what these macros does in hbdefs.h.

BTW Only GCC and compatible compilers which support function attributes
are flexible enough to reach such functionality using simple macro only.

best regards,
Przemek
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to