Commit b43402f6 authored by Andreas Tille's avatar Andreas Tille

New upstream version 1.0.10

parent 0de0f2b7
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
......@@ -208,7 +208,7 @@ string sub(string s, string pattern, string format, string attributes = null)
{
auto r = new RegExp(pattern, attributes);
auto result = r.replace(s, format);
delete r;
r.destroy();
return result;
}
......@@ -290,7 +290,7 @@ string sub(string s, string pattern, string delegate(RegExp) dg, string attribut
else
break;
}
delete r;
r.destroy();
return result;
}
......@@ -367,7 +367,7 @@ sizediff_t
find(string s, string pattern, string attributes = null)
{
auto r = new RegExp(pattern, attributes);
scope(exit) delete r;
scope(exit) r.destroy();
return r.test(s) ? r.pmatch[0].rm_so : -1;
}
......@@ -457,7 +457,7 @@ rfind(string s, string pattern, string attributes = null)
else
lastindex = eo;
}
delete r;
r.destroy();
return i;
}
......@@ -541,7 +541,7 @@ string[] split(string s, string pattern, string attributes = null)
{
auto r = new RegExp(pattern, attributes);
auto result = r.split(s);
delete r;
r.destroy();
return result;
}
......@@ -594,8 +594,10 @@ RegExp search(string s, string pattern, string attributes = null)
{
auto r = new RegExp(pattern, attributes);
if (!r.test(s))
{ delete r;
assert(r is null);
{
r.destroy();
r = null;
assert(r is null);
}
return r;
}
......@@ -936,7 +938,7 @@ private:
//optimize();
program = buf.data;
buf.data = null;
delete buf;
buf.destroy();
if (re_nsub > oldre_nsub)
{
......@@ -3018,7 +3020,7 @@ private:
else
maxb = r.maxb;
for (b = 0; b < maxb; b++)
r.base[b] |= ~prog[i + 1 + 4 + b];
r.base[b] |= ~cast(int)prog[i + 1 + 4 + b];
return 1;
case REbol:
......
......@@ -121,7 +121,7 @@ class SocketStream: Stream
* Socket streams do not support seeking. This disabled method throws
* a $(D SeekException).
*/
@disable override ulong seek(long offset, SeekPos whence)
override ulong seek(long offset, SeekPos whence)
{
throw new SeekException("Cannot seek a socket.");
}
......
......@@ -2845,7 +2845,7 @@ class MmFileStream : TArrayStream!(MmFile) {
override void close() {
if (isopen) {
super.close();
delete buf;
buf.destroy();
buf = null;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment