On Mon, 07 Dec 2009, Szak�ts Viktor wrote:

Hi,

> Since the reference to hb_set*() function is hidden 
> inside a macro defined in hbwince.h (ie. it's a macro 
> implementation detail, which user code shouldn't be aware 
> of), hbset.h should be #included from the header which 
> defines the macro, not the final .c source which uses the 
> macro.

AFAIR we have such situation in few places.
I do not like it but also I do not see big problem with it.

> Though if I put hbset.h into hbwince.h it gives a lot of 
> errors on compile. I can't find out why or where to place 
> it to avoid it.

hbwince.h is always included in windows builds. If you will
add #include "hbset.h" to this file then you will force
including hbset.h in whole code. I do not think it's good
idea. Anyhow if you want to make it then you should move
#include "hbwince.h" from hbdefs.h to hbapi.h just after
definition necessary for all other included files.
As alternative you can move all UNICODE windows macros from
hbwince.h to separate file, i.e. hbwinuni.h or hbwinuc.h
which will include hbset.h and will have to be include
explicitly by any code which needs to use them. This is
probably the cleanest solution.

best regards,
Przemek
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to