patchThe 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: 

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

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.
This can be relevant as dynamic_value or dynamic_cell (introduced in patch #10453) allocate additional memory, which shall be free'd before dynamic shell variable disposal.

Dominik Kummer <domson>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by chet (Updated the item)
  • -email is unavailable- added by domson (Submitted the item)
  •  

    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 StatusNone In Progress
    2024-05-09 domson Attached File- Added 0001-introducing-dispose_func-and-dispose_cell-for-SHELL_.patch, #56029

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code