Re: HarfBuzz API design



On 08/19/2009 04:30 PM, Carl Worth wrote:

I wanted to keep MPROTECT out of the name.  Again, please think about it again
without the mode determining whether the blob will be writeable or not.  Just
as describing the access mode of the input data only.  Do you think the
current enum makes sense that way?

Well, if the READONLY_NEVER_DUPLICATE case didn't exist, then it all
makes perfect sense, yes.

Ok, I remove that entry! There are other ways to inhibit duplication (locking the blob).


But with that value present, there *is* at least one mode (if rarely
used) where the resulting blob has write operations disabled. And it
still seems a little odd that code with:

       hb_blob_create (... HB_MEMORY_MODEL_READONLY ...);

doesn't create such a blob.

Note, it's note "MEMORY_MODEL", it's "MEMORY_MODE".


No matter. With improved documentation it's likely all just
fine. You've clearly thought a lot about the names already, and that's
really all that I can ask. :-)

The WRITEABLE vs WRITABLE bothers me now. So Maybe I change that to READWRITE. That still leaves "is_writable" and family in the API though.

behdad


-Carl


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]