2012-11-14 03:11 UTC+0100 Viktor Szakats (harbour syenar.net)

* src/rtl/hbdef.c
    ! HB_DEFAULT(): consider date and timestamp types
      interchangable.
    % HB_DEFAULT(): applied optimization from Przemek,
      so now a hb_pcount() call is saved.
This commit is contained in:
Viktor Szakats
2012-11-14 02:15:23 +00:00
parent 79949e6aad
commit 60f5dfecfb
2 changed files with 12 additions and 9 deletions

View File

@@ -16,6 +16,13 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-11-14 03:11 UTC+0100 Viktor Szakats (harbour syenar.net)
* src/rtl/hbdef.c
! HB_DEFAULT(): consider date and timestamp types
interchangable.
% HB_DEFAULT(): applied optimization from Przemek,
so now a hb_pcount() call is saved.
2012-11-14 02:27 UTC+0100 Viktor Szakats (harbour syenar.net)
* ChangeLog
* another note missed, this time from 2012-11-13 19:00 UTC+0100

View File

@@ -59,7 +59,6 @@ typedef enum
HB_IT_N,
HB_IT_C,
HB_IT_L,
HB_IT_D,
HB_IT_T,
HB_IT_B,
HB_IT_H,
@@ -80,8 +79,6 @@ static HB_IT_BASIC s_hb_itemTypeBasic( PHB_ITEM pItem )
return HB_IT_B;
case HB_IT_DATE:
return HB_IT_D;
case HB_IT_TIMESTAMP:
return HB_IT_T;
@@ -112,13 +109,12 @@ static HB_IT_BASIC s_hb_itemTypeBasic( PHB_ITEM pItem )
HB_FUNC( HB_DEFAULT )
{
if( hb_pcount() >= 2 )
{
PHB_ITEM pDefault = hb_param( 2, HB_IT_ANY );
PHB_ITEM pDefault = hb_param( 2, HB_IT_ANY );
if( s_hb_itemTypeBasic( hb_param( 1, HB_IT_ANY ) ) != s_hb_itemTypeBasic( pDefault ) )
hb_itemParamStore( 1, pDefault );
}
if( pDefault &&
s_hb_itemTypeBasic( hb_param( 1, HB_IT_ANY ) ) !=
s_hb_itemTypeBasic( pDefault ) )
hb_itemParamStore( 1, pDefault );
}
/* For compatibility with legacy DEFAULT ... TO ... command.