[freetds] [ freetds-Patches-1786200 ] char* -> const char *

SourceForge.net noreply at sourceforge.net
Thu Sep 20 11:32:36 EDT 2007


Patches item #1786200, was opened at 2007-09-01 10:26
Message generated for change (Comment added) made by freddy77
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=407808&aid=1786200&group_id=33106

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: db-lib
Group: Unstable (example)
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Steven Van Ingelgem (g00fy)
Assigned to: Nobody/Anonymous (nobody)
Summary: char* -> const char *

Initial Comment:
I mostly use std::string's for everything, but if you do a .c_str() call on it, it will return a const char * pointer... Which cannot be accepted by the call to 'tdsdbopen', 'dbopen' and 'dbuse'.
Those functions are all using char* for unknown reasons as they don't modify the contents of the pointer anyway. I made it const char * with this patch.

Maybe there are more places where you could const-ify pointers, but those gave me an immediate problem, so I only fixed those ;-).


Greetz,
Steven

----------------------------------------------------------------------

>Comment By: Frediano Ziglio (freddy77)
Date: 2007-09-20 17:32

Message:
Logged In: YES 
user_id=75766
Originator: NO

Applied. This patch do not break source or binary compatibility.

freddy77


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=407808&aid=1786200&group_id=33106


More information about the FreeTDS mailing list