On domingo, 24 de junho de 2012 22.13.58, André Pönitz wrote:
> For some reason I forgot to mention that with the current guarantee for
> fromRawData usage (user has to make sure that the base data will not be
> deleted or modified as long as the QString (or an unmodified copy of it)
> exists) this does not require d 'data' at all, just another 'magic'
> d_offset value to identify the situation. Reference counting is not
> needed, as the string (and copies thereof) have been guaranteed to die
> before the base data goes away.

It breaks the Foreign Data case, for which the d pointer includes more data
(the notify-on-delete function).

> However, since there's no chance to cross the pass-on-stack vs pass-in
> -registers boundary, and we might face extra work if we go further down
> the cheap substrings (on-potentially-fromRawData-strings...) road I
> concede that pursuing that direction is not worthwhile, and having
> always enough space to store a full d pointer opens up the possibility
> to e.g. pass custom deleters around in such cases, i.e. make (more)
> fromRawData strings first class citizens.

Yup.

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to