The GNU Bourne-Again SHell - Patches: patch #10454, Introducing dispose_func and...
You are not allowed to post comments on this tracker with your current authentication level.
patch #10454: Introducing dispose_func and dispose_cell pointer function for SHELL_VAR
Submitter: | Dominik Kummer <domson> | ||
Submitted: | Thu 09 May 2024 07:10:52 PM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | In Progress | Privacy: | Public |
Assigned to: | None | Open/Closed: | Open |
Thu 09 May 2024 07:18:52 PM UTC, comment #1: |
Dominik Kummer <domson> |
Thu 09 May 2024 07:10:52 PM UTC, original submission:
The pointer functions dispose_func and dispose_cell are, if set, called in unbind_variable or unbind_variable_element respectively.
|
Dominik Kummer <domson> |
Attached Files
file #56029: 0001-introducing-dispose_func-and-dispose_cell-for-SHELL_.patch added by domson (7KiB - text/x-patch)
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 2 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2024-05-15 | chet | Status | None | In Progress | |
2024-05-09 | domson | Attached File | - | Added 0001-introducing-dispose_func-and-dispose_cell-for-SHELL_.patch, #56029 |
Powered by Savane 3.13-4b48.
Corresponding source code
Which enables us to do something like this:
$ enable -f jsn jsn # enable json-c backend loadable builtin
$ jsn data=/path/to/backend.json # builtin processes argument assignment to setup data model and json-c interface
$ echo ${data[/json/pointer/to/key]}
Contains a Value
$ unset data[/json/pointer/to/key] # pass key to dispose_cell, unbind shell variable element
$ echo ${data[/json/pointer/to/key]}
$
$ unset data # cleanup json-c interface related memory, unbind shell variable