OSSP CVS Repository

ossp - Ticket #169
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Attach]  [Edit]  [History

Ticket 169: return representation too 'C' for string().

For string() and such, the return format is a char * ... this means the caller has to free() some allocated memory (kind of ugly).

A better solution would be to return an std::string. Though this may break some existing user's compatibility, it will make uuid much nicer to use, rather than:

char *sid = id.string(); printf("%s\n", sid); free(sid);

I could just do:

printf("%s\n", id.string().c_str());

[Add remarks]

Remarks:

Properties:

Type: code           Version: 1.6.1 
Status: new          Created: 2008-Jul-03 21:49
Severity:          Last Change: 2008-Jul-03 21:49
Priority:          Subsystem: uuid 
Assigned To: rse           Derived From:  
Creator: anonymous 

CVSTrac 2.0.1