|
|
Choosing A Webhost: |
CVS update of odbsequoia/src (stmt.cpp): msg#00093db.carob.cvs
Date: Friday, February 24, 2006 @ 16:08:55 Author: marc Path: /cvsroot/carob/odbsequoia/src Modified: stmt.cpp (1.12 -> 1.13) hid static_cast<ODBCItem *> into new objectify() function. ----------+ stmt.cpp | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) Index: odbsequoia/src/stmt.cpp diff -u odbsequoia/src/stmt.cpp:1.12 odbsequoia/src/stmt.cpp:1.13 --- odbsequoia/src/stmt.cpp:1.12 Mon Jan 23 13:00:44 2006 +++ odbsequoia/src/stmt.cpp Fri Feb 24 16:08:55 2006 @@ -29,11 +29,23 @@ using namespace ODBSeqNS; using namespace CarobNS; +namespace { + +ODBCStatement * +objectify(SQLHANDLE StatementHandle) +{ + // We don't expect the driver manager to give us corrupted handles + return static_cast<ODBCStatement *>(StatementHandle); + +} + +} + SQLRETURN SQLExecDirectW(SQLHSTMT StatementHandle, SQLWCHAR *StatementText, SQLINTEGER TextLength) { - ODBCStatement * self_p = static_cast<ODBCStatement *>(StatementHandle); + ODBCStatement * self_p = objectify(StatementHandle); self_p->clear_diags(); _PROTECT_SQLRETURN(self_p, exec_directw(StatementText, TextLength)); @@ -53,10 +65,10 @@ return SQL_SUCCESS; } -SQLRETURN +SQLRETURN // FIXME : use descriptors instead SQLRowCount(SQLHSTMT shdle, SQLLEN * rowcount) { - ODBCStatement * self_p = (ODBCStatement *)shdle; + ODBCStatement * self_p = objectify(shdle); self_p->clear_diags(); if (S5 != self_p->state
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | CVS update of odbsequoia/src (explicit_type.cpp), marc-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
|---|---|
| Next by Date: | CVS update of odbsequoia/src (7 files), marc-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Previous by Thread: | CVS update of odbsequoia/src (explicit_type.cpp), marc-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Next by Thread: | CVS update of odbsequoia/src (7 files), marc-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home
| advertise | OSDir is
an inevitable website.
|