>> For example, the _dom_string_intern should start with '_', but the
>> dom_document_alloc should not. Is there any rules for this?
>
> Yes. If it's public API, then it begins dom_. If it's library-internal
> API, then it begins _dom_.

But the dom_document_alloc is defined at src/core/document.h, which is
library-internal...

> Sure. I was just questioning whether the mapping from lwc_error to
> dom_exception needs to be public at all. Is there any situation in which
> libdom returns a lwc_error? If not, then I don't think this should be
> public. If it does, why?
>

You are right, it should be put in the src/core/string.h, thanks!

>
>> >>  static struct dom_string *__nodenames_utf8[DOM_NODE_TYPE_COUNT + 1];
>> >
>> > Is this actually needed any more?
>>
>> Yes, it is. The create_text_node/create_comment and many other
>> function need the strings inside it.
>
> They use the interned strings in the document, right? Why do we have
> this table at all, then?

Oh, you are right. I will change this.

Regards!
Bo

Reply via email to