Skip to content
  • Federico Mena Quintero's avatar
    Dispatch creation of new nodes from an array of element names, not a chain of strcmp() · 4b22ec83
    Federico Mena Quintero authored
    Also, the rsvg_new_SOME_NODE_TYPE () constructor functions now take the
    element name.
    
    This lets us:
    
    * Use bsearch() on the sorted array of element names, instead of an
      unordered chain of if (strcmp (...)).  We can replace this later with
      something better like a trie.
    
    * Port things to Rust more easily, since the constructor functions can
      dispatch on their own based on the element name.
    
    * Avoid special cases in the way
      rsvg_new_node_component_transfer_function() and
      rsvg_new_node_light_source() are called; now they dispatch on their
      own based on the element name.
    4b22ec83