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

SourceForge.net noreply at sourceforge.net
Sat Sep 1 04:26:02 EDT 2007


Patches item #1786200, was opened at 2007-09-01 10:26
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: Open
Resolution: None
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

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

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