Graeme Geldenhuys schreef:
On 29/09/06, Tomas Hajny <[EMAIL PROTECTED]> wrote:
What would be your suggestion - change it to {$IF defined(UNIX) or
defined(NETWLIBC)}? I'd say that it would be better to make the interface
completely common, i.e. to get rid of these IFDEFs completely (e.g. by
including a record defined in platform specific part of the unit).

Tomas

Yeah, I just thought it is unnecessary code duplication and extra work
if it has to be maintained.  The record idea sounds like a good plan
and will get rid of the IFDEF's completely. Sound make the code much
easier to read as well.

I won't argue the maintenance aspect, but I doubt your case for readability.

If you make this change, these fields are not in the same file as the class definition anymore, so I would have to look at two places. And the implementation becomes more unreadible.

Instead of
  FSem := 0;
It will be (assuming a record field name FPrivateData)
  FPrivateData.Sem := 0;

Vincent
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to