Skip to content

Expose node->last in the public API #844

@rinpatch

Description

@rinpatch

Reasoning: I am currently writing Erlang bindings to use libtidy as an html decoder. In Erlang, lists are internally represented as linked lists and the C API for them allows only appending to the head of the list without reconstructing it. It's much more efficient to perform the translation to Erlang terms by walking the tree last to first and appending to the children list.

It appears that the Node struct already has a pointer to the last sibling node

Node* last;
, it just needs to be exposed in the public API. I can try sending a patch if you agree the proposal makes sense

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions