[xml] Hash tables and scanner function



Hi,

I'm using xmlHashScan with an hash table with 2 keys (a name and a
namespace URI, this is quite common in libxml), and I need these 2 keys in
my xmlHashScanner callback.
The problem is that xmlHashScanner receives only the first key.

Would it break the API/ABI to add 2 parameters to xmlHashScanner for name2
and name3?
  typedef void (*xmlHashScanner) (void *payload, void *data,
                                  const xmlChar *name,
                                  const xmlChar *name2,
                                  const xmlChar *name3);

If so, should I add xmlHashScanFull and xmlHashScanFull3, with an
xmlHashScannerFull:
  typedef void (*xmlHashScannerFull) (void *payload, void *data,
                                      const xmlChar *name,
                                      const xmlChar *name2,
                                      const xmlChar *name3);
  void    xmlHashScanFull            (xmlHashTablePtr hash,
                                      xmlHashScannerFull f,
                                      void *data);
  void    xmlHashScanFull3           (xmlHashTablePtr hash,
                                      const xmlChar *name,
                                      const xmlChar *name2,
                                      const xmlChar *name3,
                                      xmlHashScannerFull f,
                                      void *data);

Tom.




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