2012-11-17 14:56 UTC+0100 Viktor Szakats (vszakats syenar.net)
* contrib/hbodbc/hbodbc.hbp
* contrib/hbodbc/odbc.c
* contrib/hbodbc/todbc.prg
* contrib/hbodbc/tests/testodbc.prg
% deleted conditional code dealing with GC pointers
without memory management. Not necessary after
finishing memory management implementation in
2012-11-16 22:32 UTC+0100 Przemyslaw Czerpak
Thanks!
* contrib/hbsqlit3/core.c
! minor in comment
This commit is contained in:
@@ -16,6 +16,20 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-11-17 14:56 UTC+0100 Viktor Szakats (vszakats syenar.net)
|
||||
* contrib/hbodbc/hbodbc.hbp
|
||||
* contrib/hbodbc/odbc.c
|
||||
* contrib/hbodbc/todbc.prg
|
||||
* contrib/hbodbc/tests/testodbc.prg
|
||||
% deleted conditional code dealing with GC pointers
|
||||
without memory management. Not necessary after
|
||||
finishing memory management implementation in
|
||||
2012-11-16 22:32 UTC+0100 Przemyslaw Czerpak
|
||||
Thanks!
|
||||
|
||||
* contrib/hbsqlit3/core.c
|
||||
! minor in comment
|
||||
|
||||
2012-11-17 14:23 UTC+0100 Viktor Szakats (vszakats syenar.net)
|
||||
* extras/hbdoc/hbdoc.css
|
||||
* website/css/styles.css
|
||||
|
||||
@@ -19,12 +19,6 @@
|
||||
-depincpath=odbc:/usr/include
|
||||
-depincpath=odbc:/usr/local/include
|
||||
|
||||
# Automatic memory management. Causes
|
||||
# memory corruption, so it's disabled
|
||||
# until fixed:
|
||||
-D_HBODBC_AUTO_MM_
|
||||
-cflag=-D_HBODBC_AUTO_MM_
|
||||
|
||||
hbodbc.hbx
|
||||
|
||||
odbc.c
|
||||
|
||||
@@ -80,12 +80,6 @@
|
||||
#include "hbapistr.h"
|
||||
#include "hbset.h"
|
||||
|
||||
/* Make sure to not deprecate manual MM functions if
|
||||
automatic MM is not enabled yet */
|
||||
#if ! defined( _HBODBC_AUTO_MM_ ) && ! defined( HB_LEGACY_LEVEL4 )
|
||||
# define HB_LEGACY_LEVEL4
|
||||
#endif
|
||||
|
||||
/* NOTE: This code using pointer items is a little bit more complicated
|
||||
then it has to be.
|
||||
In current code pointer items can keep references only to other
|
||||
@@ -174,12 +168,10 @@ static HB_GARBAGE_FUNC( hb_SQLHENV_Destructor )
|
||||
/* Check if pointer is not NULL to avoid multiple freeing */
|
||||
if( pHEnv->hEnv )
|
||||
{
|
||||
#if defined( _HBODBC_AUTO_MM_ )
|
||||
#if ODBCVER >= 0x0300
|
||||
SQLFreeHandle( SQL_HANDLE_ENV, ( SQLHANDLE ) pHEnv->hEnv );
|
||||
#else
|
||||
SQLFreeEnv( pHEnv->hEnv );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* set pointer to NULL to avoid multiple freeing */
|
||||
@@ -227,12 +219,10 @@ static HB_GARBAGE_FUNC( hb_SQLHDBC_Destructor )
|
||||
/* Check if pointer is not NULL to avoid multiple freeing */
|
||||
if( pHDbc->hDbc )
|
||||
{
|
||||
#if defined( _HBODBC_AUTO_MM_ )
|
||||
#if ODBCVER >= 0x0300
|
||||
SQLFreeHandle( SQL_HANDLE_DBC, ( SQLHANDLE ) pHDbc->hDbc );
|
||||
#else
|
||||
SQLFreeConnect( pHDbc->hDbc );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* set pointer to NULL to avoid multiple freeing */
|
||||
@@ -327,12 +317,10 @@ static HB_GARBAGE_FUNC( hb_SQLHSTMT_Destructor )
|
||||
{
|
||||
if( hb_SQLHDBC_check( pHStmt->pHDbcItm, pHStmt->conn_counter ) )
|
||||
{
|
||||
#if defined( _HBODBC_AUTO_MM_ )
|
||||
#if ODBCVER >= 0x0300
|
||||
SQLFreeHandle( SQL_HANDLE_STMT, ( SQLHANDLE ) pHStmt->hStmt );
|
||||
#else
|
||||
SQLFreeStmt( pHStmt->hStmt, SQL_DROP );
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -530,30 +518,14 @@ HB_FUNC( SQLDISCONNECT ) /* hDbc --> nRetCode */
|
||||
|
||||
HB_FUNC( SQLFREECONNECT ) /* hDbc --> nRetCode */
|
||||
{
|
||||
#if ! defined( _HBODBC_AUTO_MM_ )
|
||||
SQLHDBC hDbc = hb_SQLHDBC_par( 1 );
|
||||
|
||||
if( hDbc )
|
||||
hb_retni( SQLFreeConnect( hDbc ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
HB_FUNC( SQLFREEENV ) /* hEnv --> nRetCode */
|
||||
{
|
||||
#if ! defined( _HBODBC_AUTO_MM_ )
|
||||
SQLHDBC hDbc = hb_SQLHDBC_par( 1 );
|
||||
|
||||
if( hDbc )
|
||||
hb_retni( SQLFreeEnv( hDbc ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
HB_FUNC( SQLFREESTMT ) /* hStmt, nType --> nRetCode */
|
||||
{
|
||||
#if ! defined( _HBODBC_AUTO_MM_ )
|
||||
hb_retni( SQLFreeStmt( hb_SQLHSTMT_par( 1 ),
|
||||
( SQLUSMALLINT ) hb_parni( 2 ) ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -65,15 +65,6 @@ PROCEDURE Main()
|
||||
? "------------------------------------------------------------------------------"
|
||||
? Str( nRows, 4 ), " Row(s) affected."
|
||||
|
||||
#if defined( _HBODBC_AUTO_MM_ )
|
||||
// hStmt := NIL // TOFIX: There should be no GPF even without this line
|
||||
|
||||
SQLDisconnect( hDbc )
|
||||
#else
|
||||
SQLFreeStmt( hStmt, SQL_DROP )
|
||||
SQLDisconnect( hDbc )
|
||||
SQLFreeConnect( hDbc )
|
||||
SQLFreeEnv( hEnv )
|
||||
#endif
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -208,18 +208,10 @@ METHOD SetAutoCommit( lEnable ) CLASS TODBC
|
||||
|
||||
METHOD Destroy() CLASS TODBC
|
||||
|
||||
#if defined( _HBODBC_AUTO_MM_ )
|
||||
// ::hStmt := NIL // TOFIX: There should be no GPF even without this line
|
||||
|
||||
SQLDisconnect( ::hDbc ) // Disconnects from Driver
|
||||
|
||||
::hDbc := NIL // Frees the connection
|
||||
::hEnv := NIL // Frees the environment
|
||||
#else
|
||||
SQLDisconnect( ::hDbc ) // Disconnects from Driver
|
||||
SQLFreeConnect( ::hDbc ) // Frees the connection
|
||||
SQLFreeEnv( ::hEnv ) // Frees the environment
|
||||
#endif
|
||||
|
||||
RETURN NIL
|
||||
|
||||
@@ -388,11 +380,7 @@ METHOD ExecSQL() CLASS TODBC
|
||||
METHOD Close() CLASS TODBC
|
||||
|
||||
// Frees the statement
|
||||
#if defined( _HBODBC_AUTO_MM_ )
|
||||
::hStmt := NIL
|
||||
#else
|
||||
SQLFreeStmt( ::hStmt, SQL_DROP )
|
||||
#endif
|
||||
::Active := .F.
|
||||
|
||||
// Reset all recordset related variables
|
||||
|
||||
@@ -568,7 +568,7 @@ HB_FUNC( SQLITE3_SHUTDOWN )
|
||||
/**
|
||||
Enable Or Disable Extended Result Codes
|
||||
|
||||
sqlite3_extended_result_codes( db, lOnOff) -> nResultCode
|
||||
sqlite3_extended_result_codes( db, lOnOff ) -> nResultCode
|
||||
*/
|
||||
|
||||
HB_FUNC( SQLITE3_EXTENDED_RESULT_CODES )
|
||||
@@ -654,7 +654,7 @@ HB_FUNC( SQLITE3_LAST_INSERT_ROWID )
|
||||
/**
|
||||
Name Of The Folder Holding Temporary Files
|
||||
|
||||
sqlite3_temp_directory( cDirName ) -> lResult (HB_TRUE/HB_FALSE)
|
||||
sqlite3_temp_directory( cDirName ) -> lResult
|
||||
*/
|
||||
|
||||
HB_FUNC( SQLITE3_TEMP_DIRECTORY )
|
||||
@@ -775,7 +775,7 @@ HB_FUNC( SQLITE3_OPEN_V2 )
|
||||
/**
|
||||
One-Step Query Execution Interface
|
||||
|
||||
sqlite3_exec( db, cSQLTEXT, [pCallbackFunc]|[cCallbackFunc] ) -> nResultCode
|
||||
sqlite3_exec( db, cSQLTEXT, [pCallbackFunc | cCallbackFunc] ) -> nResultCode
|
||||
*/
|
||||
|
||||
HB_FUNC( SQLITE3_EXEC )
|
||||
@@ -897,7 +897,7 @@ HB_FUNC( SQLITE3_SQL )
|
||||
/**
|
||||
Prepared Statement Status.
|
||||
|
||||
sqlite3_stmt_status( pStmt, nOp, lResetFlag) -> nStatus
|
||||
sqlite3_stmt_status( pStmt, nOp, lResetFlag ) -> nStatus
|
||||
*/
|
||||
|
||||
HB_FUNC( SQLITE3_STMT_STATUS )
|
||||
@@ -1265,7 +1265,7 @@ HB_FUNC( SQLITE3_COLUMN_DECLTYPE )
|
||||
/**
|
||||
Column Names In A Result Set
|
||||
|
||||
sqlite3_column_name( pStmt, columnIndex) -> columnName
|
||||
sqlite3_column_name( pStmt, columnIndex ) -> columnName
|
||||
*/
|
||||
|
||||
HB_FUNC( SQLITE3_COLUMN_NAME )
|
||||
@@ -1535,9 +1535,9 @@ HB_FUNC( SQLITE3_TABLE_COLUMN_METADATA )
|
||||
/**
|
||||
Source Of Data In A Query Result
|
||||
|
||||
sqlite3_column_database_name( pStmt, ColumnIndex) -> cDatabaseName
|
||||
sqlite3_column_table_name( pStmt, ColumnIndex) -> cTableName
|
||||
sqlite3_column_origin_name( pStmt, ColumnIndex) -> cColumnName
|
||||
sqlite3_column_database_name( pStmt, ColumnIndex ) -> cDatabaseName
|
||||
sqlite3_column_table_name( pStmt, ColumnIndex ) -> cTableName
|
||||
sqlite3_column_origin_name( pStmt, ColumnIndex ) -> cColumnName
|
||||
*/
|
||||
|
||||
HB_FUNC( SQLITE3_COLUMN_DATABASE_NAME )
|
||||
@@ -1736,7 +1736,7 @@ HB_FUNC( SQLITE3_BLOB_WRITE )
|
||||
/**
|
||||
Test To See If The Database Is In Auto-Commit Mode
|
||||
|
||||
sqlite3_get_autocommit( db ) -> lResult (HB_TRUE/HB_FALSE)
|
||||
sqlite3_get_autocommit( db ) -> lResult
|
||||
*/
|
||||
|
||||
HB_FUNC( SQLITE3_GET_AUTOCOMMIT )
|
||||
@@ -1861,7 +1861,7 @@ HB_FUNC( SQLITE3_BUFF_TO_FILE )
|
||||
Causes any pending database operation to abort and return at its
|
||||
earliest opportunity.
|
||||
|
||||
sqlite3_interrupt( db) -> Nil
|
||||
sqlite3_interrupt( db ) -> Nil
|
||||
*/
|
||||
|
||||
HB_FUNC( SQLITE3_INTERRUPT )
|
||||
@@ -2032,9 +2032,9 @@ HB_FUNC( SQLITE3_SET_AUTHORIZER )
|
||||
return pointer to Backup or NIL if error occurs
|
||||
|
||||
sqlite3_backup_step( pBackup, nPage ) -> nResult
|
||||
sqlite3_backup_finish( pBackup ) -> nResult
|
||||
sqlite3_backup_remaining( pBackup ) -> nResult
|
||||
sqlite3_backup_pagecount( pBackup ) -> nResult
|
||||
sqlite3_backup_finish( pBackup ) -> nResult
|
||||
sqlite3_backup_remaining( pBackup ) -> nResult
|
||||
sqlite3_backup_pagecount( pBackup ) -> nResult
|
||||
*/
|
||||
|
||||
HB_FUNC( SQLITE3_BACKUP_INIT )
|
||||
@@ -2159,7 +2159,7 @@ HB_FUNC( SQLITE3_THREADSAFE )
|
||||
/**
|
||||
SQLite Runtime Status
|
||||
|
||||
sqlite3_status( nOp, @nCurrent, @nHighwater, lResetFlag) -> nResult
|
||||
sqlite3_status( nOp, @nCurrent, @nHighwater, lResetFlag ) -> nResult
|
||||
*/
|
||||
|
||||
HB_FUNC( SQLITE3_STATUS )
|
||||
@@ -2182,7 +2182,7 @@ HB_FUNC( SQLITE3_STATUS )
|
||||
/**
|
||||
Database Connection Status
|
||||
|
||||
sqlite3_db_status( pDb, nOp, @nCurrent, @nHighwater, lResetFlag) -> nResult
|
||||
sqlite3_db_status( pDb, nOp, @nCurrent, @nHighwater, lResetFlag ) -> nResult
|
||||
*/
|
||||
|
||||
HB_FUNC( SQLITE3_DB_STATUS )
|
||||
|
||||
Reference in New Issue
Block a user