Inherit RangedPtr's operator= in all of SpiderMonkey's *CharsZ classes, so that assignment of the correct raw pointer to each will compile. No bug, r=terrence over IRC

This commit is contained in:
Jeff Walden 2013-12-19 13:56:24 -05:00
parent 8cb19f9255
commit 59fac783ea
2 changed files with 8 additions and 0 deletions

View File

@ -59,6 +59,8 @@ class Latin1CharsZ : public mozilla::RangedPtr<unsigned char>
JS_ASSERT(aBytes[aLength] == '\0');
}
using Base::operator=;
char *c_str() { return reinterpret_cast<char *>(get()); }
};
@ -98,6 +100,8 @@ class UTF8CharsZ : public mozilla::RangedPtr<unsigned char>
JS_ASSERT(aBytes[aLength] == '\0');
}
using Base::operator=;
char *c_str() { return reinterpret_cast<char *>(get()); }
};
@ -149,6 +153,8 @@ class TwoByteCharsZ : public mozilla::RangedPtr<jschar>
{
JS_ASSERT(chars[length] == '\0');
}
using Base::operator=;
};
/*

View File

@ -50,6 +50,8 @@ class StableCharPtr : public CharPtr {
StableCharPtr(const jschar *pos, const jschar *start, size_t len)
: CharPtr(pos, start, len)
{}
using CharPtr::operator=;
};
#if defined JS_THREADSAFE && defined JS_DEBUG