
|
If you were logged in you would be able to see more operations.
|
|
|
| Resolution Date: |
25/Oct/04 05:09 PM
|
|
Use of strtok and wcstok are discouraged, I quote from the man page for strtok:
BUGS
Never use these functions. If you do, note that:
These functions modify their first argument.
These functions cannot be used on constant strings.
The identity of the delimiting character is lost.
The strtok() function uses a static buffer while
parsing, so it's not thread safe. Use strtok_r() if
this matters to you.
I discovered this after getting a report from valgrind that StringTokenizer used a delete where it should have used a delete [], however there is no reason just to fix that one problem.
It should be trivial to rewrite using std::basic_string methods.
|
|
Description
|
Use of strtok and wcstok are discouraged, I quote from the man page for strtok:
BUGS
Never use these functions. If you do, note that:
These functions modify their first argument.
These functions cannot be used on constant strings.
The identity of the delimiting character is lost.
The strtok() function uses a static buffer while
parsing, so it's not thread safe. Use strtok_r() if
this matters to you.
I discovered this after getting a report from valgrind that StringTokenizer used a delete where it should have used a delete [], however there is no reason just to fix that one problem.
It should be trivial to rewrite using std::basic_string methods. |
Show » |
| No work has yet been logged on this issue.
|
|