(bindingTable)
| 481 | * |
| 482 | *-------------------------------------------------------------- |
| 483 | */ |
| 484 | |
| 485 | void |
| 486 | Tk_DeleteBindingTable(bindingTable) |
| 487 | Tk_BindingTable bindingTable; /* Token for the binding table to |
| 488 | * destroy. */ |
| 489 | { |
| 490 | BindingTable *bindPtr = (BindingTable *) bindingTable; |
| 491 | PatSeq *psPtr, *nextPtr; |
| 492 | Tcl_HashEntry *hPtr; |
| 493 | Tcl_HashSearch search; |
| 494 | |
| 495 | /* |
| 496 | * Find and delete all of the patterns associated with the binding |
| 497 | * table. |
| 498 | */ |
| 499 | |
| 500 | for (hPtr = Tcl_FirstHashEntry(&bindPtr->patternTable, &search); |
| 501 | hPtr != NULL; hPtr = Tcl_NextHashEntry(&search)) { |
| 502 | for (psPtr = (PatSeq *) Tcl_GetHashValue(hPtr); |
| 503 | psPtr != NULL; psPtr = nextPtr) { |
| 504 | nextPtr = psPtr->nextSeqPtr; |
| 505 | Tk_EventuallyFree((ClientData) psPtr->command, |
| 506 | (Tk_FreeProc *) free); |
| 507 | ckfree((char *) psPtr); |
| 508 | } |
| 509 | } |
| 510 | |
| 511 | /* |
| 512 | * Clean up the rest of the information associated with the |
| 513 | * binding table. |
| 514 | */ |
| 515 | |
| 516 | Tcl_DeleteHashTable(&bindPtr->patternTable); |
| 517 | Tcl_DeleteHashTable(&bindPtr->objectTable); |
| 518 | ckfree((char *) bindPtr); |
| 519 | } |
| 520 |
no test coverage detected