Question about hash key

Help
Jaime
2010-03-04
2013-04-24
  • Jaime
    Jaime
    2010-03-04

    I am new to uthash but it looks like a very convenient, fast and simple way to hash structures. I am trying to implement it in a piece of code but I realized that when I call the uthash utilities (HASH_ADD, HASH_FIND, etc) the key that I pass as an argument has to have exactly the name of the key variable in the structure. In other words, I cannot pass a variable of the same type (say, int) with a different name. Is this just an inconvenience, or is there anything deeper behind it (in other words, can I just rename the key tfrom whatever it is to 'key' and then pass it as an argument)?
    thanks!