12.8.4 Foreign hash tables
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Foreign Language Interface
        • Notes on Using Foreign Code
          • Foreign hash tables
            • PL_new_hash_table()
            • PL_free_hash_table()
            • PL_lookup_hash_table()
            • PL_add_hash_table()
            • PL_del_hash_table()
            • PL_clear_hash_table()
            • PL_new_hash_table_enum()
            • PL_free_hash_table_enum()
            • PL_advance_hash_table_enum()
    • Packages
Availability:C-language interface function
void* PL_add_hash_table(hash_table_t table, void *key, void *value, int flags)
Add key-value to the table. The behaviour if key is already in the table depends on flags. If 0, this function returns the existing value without updating the table. If PL_HT_UPDATE the old value is replaced and the function returns the old value. If PL_HT_NEW, a message and backtrace are printed and the function returns NULL if key is already in the table.