Opened 17 years ago

Closed 17 years ago

#367 closed enhancement (fixed)

Hash table will duplicate the hash key (thanks Scott Lu)

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-0.8.0
Component: pjlib Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description

Previously, the hash table will just keep the pointer of the key in pj_hash_set(). This is inconsistent with the pj_hash_set() API declaration, which says that the key is a const pointer, which normally should be copied by the function, and not kept for reference.

Although this works fine for PJSIP libraries, unsuspecting users may expect this function to behave differently, thus a better implementation is to duplicate the key to avoid confusion.

Change History (1)

comment:1 Changed 17 years ago by bennylp

  • Resolution set to fixed
  • Status changed from new to closed

Implemented in r1429

Note: See TracTickets for help on using tickets.