monotone

monotone Commit Details

Date:2010-11-23 01:10:47 (8 years 6 months ago)
Author:Timothy Brownawell
Branch:net.venge.monotone
Commit:046b3d9c482da33053f4f97221237d0d1498b72f
Parents: a69b014519d54982daf0ea0ab54999b3a4e292d3
Message:Don't rely on C99-only variable-stack-arrays.

Changes:
Mpcrewrap.cc (1 diff)

File differences

pcrewrap.cc
152152
153153
154154
155
156
155
156
157
158
159
160
161
162
163
164
165
157166
158167
159168
cap_count += 1;
int worksize = cap_count * 3;
// yes, C99 only
int ovector[worksize];
// "int ovector[worksize]" is C99 only (not valid C++, but allowed by gcc/clang)
// boost::shared_array is I think not plannned to be part of C++0x
class xyzzy {
int *data;
public:
xyzzy(int len) : data(new int[len]) {}
~xyzzy() { delete[] data; }
operator int*() { return data; }
} ovector(worksize);
rc = pcre_exec(basedat, extradat,
subject.data(), subject.size(),
0, flags_to_internal(options), ovector, worksize);

Archive Download the corresponding diff file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status