diff options
| author | Onnie Lynn Winebarger <owinebar@gmail.com> | 2023-09-20 10:35:16 -0400 |
|---|---|---|
| committer | Onnie Lynn Winebarger <owinebar@gmail.com> | 2023-09-20 10:35:16 -0400 |
| commit | 0dcaa2cc9c36e0f5f6722cc0017cf0fced4d9c27 (patch) | |
| tree | 302020031f1c413e229f03cf9038c063a5064f49 | |
| parent | 15106c6acdd230c95a13f429d2330a4eb4ff9bfb (diff) | |
Provide two versions for tam-release, one with and one without finalization.externals/tamexternals/pam
| -rw-r--r-- | tam.el | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -431,17 +431,28 @@ Moves object to live list." (tam-claim/inline pool)) (defsubst tam-release/inline (pool idx) - "Release object at index IDX of POOL." + "Release object at index IDX of POOL. +User is responsible for any required finalization. +Inline version" + (tam--free-slot pool (tam-pool-get pool idx)) + nil) + +(defsubst tam-release-finalize/inline (pool idx) + "Release object at index IDX of POOL and invoke specified finalizer." (let ((s (tam-pool-get pool idx)) (reset (tam--pool-reset pool))) (tam--free-slot pool s) - (when reset - (funcall reset (tam--slot-contents s))) + (funcall reset (tam--slot-contents s)) nil)) (defun tam-release (pool idx) - "Release object at index IDX of POOL." + "Release object at index IDX of POOL. +User is responsible for any required finalization." (tam-release/inline pool idx)) +(defun tam-release-finalize (pool idx) + "Release object at index IDX of POOL and invoke specified finalizer." + (tam-release-finalize/inline pool idx)) + (provide 'tam) ;;; tam.el ends here |
