Diff of /libregex/op_regex.cpp [ecfbcc] .. [74abfb]  Maximize  Restore

  Switch to unified view

a/libregex/op_regex.cpp b/libregex/op_regex.cpp
...
...
26
string op_regerror(int err, regex_t const & regexp)
26
string op_regerror(int err, regex_t const & regexp)
27
{
27
{
28
    size_t needed_size = regerror(err, &regexp, 0, 0);
28
    size_t needed_size = regerror(err, &regexp, 0, 0);
29
    char * buffer = new char[needed_size];
29
    char * buffer = new char[needed_size];
30
    regerror(err, &regexp, buffer, needed_size);
30
    regerror(err, &regexp, buffer, needed_size);
31
31
  string retval = buffer;
32
  return buffer;
32
  delete [] buffer;
33
  return retval;
33
}
34
}
34
35
35
36
36
void op_regcomp(regex_t & regexp, string const & pattern)
37
void op_regcomp(regex_t & regexp, string const & pattern)
37
{
38
{

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks