On Tue, Jan 29, 2019 at 02:08:59AM -0800, Nanday Dan wrote:
On Tuesday, January 29, 2019 at 12:22:08 AM UTC+5:30, Kris Maglione wrote:
>Is it possible to add an extra variable to mozilla string(nsTStringRepr).
>
>
>I added a bool variable to nsTStringRepr class in Xpcom/Strings/
As something of a side note, the general way to do this is to
add a new data or class flag, and store it in one of the
existing fields:
I think storing in existing fields will break the actual usage/functioning of
those fields and it will make more complex. So I felt like adding a new flag
will not affect normal functioning of it.
You have this entirely backward. The existing flags fields are
meant to store arbitrary boolean flags that describe a string's
contents. Existing code knows about them, and is prepared to
deal with them. Adding a new field to the string representation,
on the other hand, is a drastic change that existing code is
*not* prepared to deal with.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform