From a05a2ec496b54260bd675ca788ed7401e7279893 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Tue, 25 Jan 2011 15:54:46 +0000 Subject: [PATCH] 2011-01-25 16:54 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/vm/itemapi.c * do not clear parameter when NULL item is passed to hb_itemParamStore*() functions * harbour/contrib/hbnetio/netiosrv.c * harbour/contrib/hbnetio/readme.txt - removed NETIO_SRVSOCKET() * harbour/ChangeLog * marked TODO as DONE --- harbour/ChangeLog | 13 +++++++++++++ harbour/contrib/hbnetio/netiosrv.c | 9 +-------- harbour/contrib/hbnetio/readme.txt | 5 ----- harbour/src/vm/itemapi.c | 16 +++++++--------- 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a2016df379..e2f7565e08 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,18 @@ The license applies to all entries newer than 2009-04-28. */ +2011-01-25 16:54 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/vm/itemapi.c + * do not clear parameter when NULL item is passed to + hb_itemParamStore*() functions + + * harbour/contrib/hbnetio/netiosrv.c + * harbour/contrib/hbnetio/readme.txt + - removed NETIO_SRVSOCKET() + + * harbour/ChangeLog + * marked TODO as DONE + 2011-01-25 16:39 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbnetio/utils/netiosrv/netiosrv.prg * Minors. @@ -77,6 +89,7 @@ replaced by: NETIO_SRVSTATUS( pConnSock, NETIO_SRVINFO_FILESCOUNT, @nCount ) so it can be removed too. + [DONE] 2011-01-25 12:11 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbnetio/utils/netiosrv/netiosrv.prg diff --git a/harbour/contrib/hbnetio/netiosrv.c b/harbour/contrib/hbnetio/netiosrv.c index b5872468d9..3850ecc2fc 100644 --- a/harbour/contrib/hbnetio/netiosrv.c +++ b/harbour/contrib/hbnetio/netiosrv.c @@ -1417,15 +1417,8 @@ HB_FUNC( NETIO_SRVSTATUS ) hb_xfree( addr ); } hb_itemParamStoreRelease( 3, pItem ); + break; } } hb_retni( iStatus ); } - -HB_FUNC( NETIO_SRVSOCKET ) -{ - PHB_CONSRV conn = s_consrvParam( 1 ); - - if( conn ) - hb_socketItemPut( hb_stackReturnItem(), conn->sd ); -} diff --git a/harbour/contrib/hbnetio/readme.txt b/harbour/contrib/hbnetio/readme.txt index bb32f976f0..34e794dbde 100644 --- a/harbour/contrib/hbnetio/readme.txt +++ b/harbour/contrib/hbnetio/readme.txt @@ -155,8 +155,3 @@ Server side functions: [, | , @] ) -> NETIO_SRVSENDITEM( , , ) -> NETIO_SRVSENDDATA( , , ) -> - - NETIO_SRVSOCKET( ) -> - can be used with Harbour socket functions (hb_socket*()) - Please remember that handle can be used only for statistics - and must not be used for any send/receive operations. diff --git a/harbour/src/vm/itemapi.c b/harbour/src/vm/itemapi.c index de5bbb9456..3841745dd3 100644 --- a/harbour/src/vm/itemapi.c +++ b/harbour/src/vm/itemapi.c @@ -128,11 +128,11 @@ HB_BOOL hb_itemParamStore( HB_USHORT uiParam, PHB_ITEM pItem ) if( hb_param( uiParam, HB_IT_BYREF ) ) { - HB_STACK_TLS_PRELOAD if( pItem ) + { + HB_STACK_TLS_PRELOAD hb_itemCopyToRef( hb_stackItemFromBase( uiParam ), pItem ); - else - hb_itemClear( hb_stackItemFromBase( uiParam ) ); + } return HB_TRUE; } @@ -145,11 +145,11 @@ HB_BOOL hb_itemParamStoreForward( HB_USHORT uiParam, PHB_ITEM pItem ) if( hb_param( uiParam, HB_IT_BYREF ) ) { - HB_STACK_TLS_PRELOAD if( pItem ) + { + HB_STACK_TLS_PRELOAD hb_itemMoveToRef( hb_stackItemFromBase( uiParam ), pItem ); - else - hb_itemClear( hb_stackItemFromBase( uiParam ) ); + } return HB_TRUE; } @@ -162,14 +162,12 @@ HB_BOOL hb_itemParamStoreRelease( HB_USHORT uiParam, PHB_ITEM pItem ) if( hb_param( uiParam, HB_IT_BYREF ) ) { - HB_STACK_TLS_PRELOAD if( pItem ) { + HB_STACK_TLS_PRELOAD hb_itemMoveToRef( hb_stackItemFromBase( uiParam ), pItem ); hb_itemRelease( pItem ); } - else - hb_itemClear( hb_stackItemFromBase( uiParam ) ); return HB_TRUE; }