2010-02-02 21:50 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbpgsql/postgres.c
* contrib/hbpgsql/tests/test.prg
* Destructor PQCLOSETRACE() marked as deprecated, replaced in
test app with NIL assignment.
! Fixes to FILE object type.
; All this is only relevant if built with NODLL flag.
This commit is contained in:
@@ -17,6 +17,14 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-02-02 21:50 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbpgsql/postgres.c
|
||||
* contrib/hbpgsql/tests/test.prg
|
||||
* Destructor PQCLOSETRACE() marked as deprecated, replaced in
|
||||
test app with NIL assignment.
|
||||
! Fixes to FILE object type.
|
||||
; All this is only relevant if built with NODLL flag.
|
||||
|
||||
2010-02-02 21:44 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbpgsql/postgres.c
|
||||
+ Added GC support for all remaining pointer types (result/cancel/FILE).
|
||||
|
||||
@@ -235,7 +235,7 @@ static HB_GARBAGE_FUNC( FILE_release )
|
||||
if( ph && * ph )
|
||||
{
|
||||
/* Destroy the object */
|
||||
PQclear( ( FILE * ) * ph );
|
||||
fclose( ( FILE * ) * ph );
|
||||
|
||||
/* set pointer to NULL to avoid multiple freeing */
|
||||
* ph = NULL;
|
||||
@@ -1034,15 +1034,21 @@ HB_FUNC( PQCREATETRACE )
|
||||
#endif
|
||||
}
|
||||
|
||||
/* NOTE: Deprecated */
|
||||
HB_FUNC( PQCLOSETRACE )
|
||||
{
|
||||
#ifdef NODLL
|
||||
FILE * trfile = hb_FILE_par( 1 );
|
||||
void ** ph = ( void ** ) hb_parptrGC( &s_gcFILEFuncs, 1 );
|
||||
|
||||
if( trfile )
|
||||
fclose( trfile );
|
||||
else
|
||||
hb_errRT_BASE( EG_ARG, 2020, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
/* Check if pointer is not NULL to avoid multiple freeing */
|
||||
if( ph && * ph )
|
||||
{
|
||||
/* Destroy the object */
|
||||
fclose( ( FILE * ) * ph );
|
||||
|
||||
/* set pointer to NULL to avoid multiple freeing */
|
||||
* ph = NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -94,6 +94,6 @@ Function main()
|
||||
res := NIL
|
||||
|
||||
PQuntrace( conn )
|
||||
PQclosetrace( pFile )
|
||||
pFile := NIL
|
||||
conn := NIL
|
||||
return NIL
|
||||
|
||||
Reference in New Issue
Block a user