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());
Remarks:
Properties:
Type: |
code |
|
Version: |
1.6.1 |
Status: |
new |
|
Created: |
2008-Jul-03 21:49 |
Severity: |
3 |
|
Last Change: |
2008-Jul-03 21:49 |
Priority: |
3 |
|
Subsystem: |
uuid |
Assigned To: |
rse |
|
Derived From: |
|
Creator: |
anonymous |