Hi Przemek, > Viktor, > > The bad thing with abstracted types is the fact the it makes creating > interface between Harbour and other tools harder. > As long as Harbour uses well known types then it's quite easy. > When I have a function in some library which needs as parameter variable as > type 'abc' and returns result as type 'xyz' and I can see exactly the same > types in harbour public functions then creating the wrapper is trivial. > In the moment when we introduce our own new types then we create new > possible problems for many users who have to create some simple extensions > in C. And this is sth what causes that I want to delay this moment as long > as possible. Just simply I'm nearly sure that it will break much more things > then resolve current problems which seems to be really minor in comparison > to potential problems which will be created by users ;-)
My basic proposition is to use HB_ prefixed types instead of current Windows names, which seems quite harmless (except a few, but important corner cases, like HB_ULONG). I'd like it even better if we'd use _plain C types_ wherever possible. That would make 3rd party developers the most happy I guess. And I agree that we should only use abstract Harbour types if they really makes sense, and only then (f.e. HB_SIZE). > In this case I agree that final type for error codes should be existing > HB_ERRCODE and this type should be converted to 'unsigned int' but before > you will change it please check all places in the Harbour SVN which will > be effected by such modification. We have to well know them. I'm mostly > interested in all structures and function parameters which may use USHORT > so they have to be converted to HB_ERRCODE. And of course we will have to > eliminate casting added to pacify MSVC warnings in code like: > uiOsErrorLast = ( USHORT ) GetLastError(); > Such modification fully breaks any binary compatibility in some subsystems > like GT or RDD so if we want to make it then it should be done ASAP before > final 2.0. Okay. > So as 1-st step I suggest to systematically replace all USHORT used > in error code context with HB_ERRCODE without changing the HB_ERRCODE > definition. Fine, I agree. Brgds, Viktor _______________________________________________ Harbour mailing list (attachment size limit: 40KB) [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
