From e10df29fdd110e6a622f6fa55070660c1296d23c Mon Sep 17 00:00:00 2001 From: "Alexander S.Kresin" Date: Mon, 11 Sep 2006 16:31:10 +0000 Subject: [PATCH] 2006-09-11 20:30 UTC+0300 Alexander Kresin --- harbour/ChangeLog | 4 ++++ harbour/source/vm/itemapi.c | 11 +++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1a2fe1b0d2..6d2b7cc9d8 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,10 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ + I'll add Class(y) compatible functions used in class(y) header files + so it will be possible to use original class(y) .ch files in Harbour + though it will not be the most efficient because we have @func() operator + which gives better performance then using codeblocks. Anyhow classy create separate meta class for each class with CLASS members and () function always return such meta class object so for full Class(y) compatibility we need to generate differ .prg code. diff --git a/harbour/source/vm/itemapi.c b/harbour/source/vm/itemapi.c index ed2dfd7308..408b52f2a0 100644 --- a/harbour/source/vm/itemapi.c +++ b/harbour/source/vm/itemapi.c @@ -1631,14 +1631,13 @@ HB_EXPORT int hb_itemStrCmp( PHB_ITEM pFirst, PHB_ITEM pSecond, BOOL bForceExact } while( --ulMinLen ); - if( !iRet && ulLenSecond != ulLenFirst ) + if( hb_set.HB_SET_EXACT || bForceExact || ulLenSecond > ulLenFirst ) { - if( ulLenSecond > ulLenFirst ) - iRet = 1; - else if( hb_set.HB_SET_EXACT || bForceExact ) - iRet = -1; + /* Force an exact comparison */ + if( !iRet && ulLenFirst != ulLenSecond ) + /* If length is different ! */ + iRet = ( ulLenFirst < ulLenSecond ) ? -1 : 1; } - } } else