globus_rsl_memory(3)
π globus_rsl_memory β RSL Memory Management π
okay so bestie, welcome to globus_rsl_memory(3), a page from the globus_rsl library functions manual, and it is literally all about RSL Memory Management. that's it, that's the whole vibe. memory. management. slay.
β¨ SYNOPSIS β¨
π«Ά Functions
globus_rsl_t * globus_rsl_copy_recursive (globus_rsl_t *ast_node)β Create a deep copy of an RSL syntax tree.globus_rsl_value_t * globus_rsl_value_copy_recursive (globus_rsl_value_t *globus_rsl_value_ptr)β Create a deep copy of an RSL value.int globus_rsl_value_free (globus_rsl_value_t *val)β Free an RSL value node.int globus_rsl_free (globus_rsl_t *ast_node)β Free an RSL syntax tree node.int globus_rsl_value_free_recursive (globus_rsl_value_t *globus_rsl_value_ptr)β Free an RSL value and all its child nodes.int globus_rsl_free_recursive (globus_rsl_t *ast_node)β Free an RSL syntax tree and all its child nodes.int globus_rsl_value_list_literal_replace (globus_list_t *value_list, char *string_value)β Replace the first value in a value list with a literal.int globus_rsl_value_eval (globus_rsl_value_t *ast_node, globus_symboltable_t *symbol_table, char **string_value, int rsl_substitution_flag)β Evaluate RSL substitions in an RSL value node.int globus_rsl_eval (globus_rsl_t *ast_node, globus_symboltable_t *symbol_table)β Evaluate an RSL syntax tree.
πΈ Detailed Description πΈ
RSL Memory Management. that's the whole description bestie, they really said "short and iconic" π
π Function Documentation π
π globus_rsl_t * globus_rsl_copy_recursive (globus_rsl_t * ast_node)
Create a deep copy of an RSL syntax tree.
so the globus_rsl_copy_recursive() function does a deep copy of the RSL syntax tree that ast_node is pointing at. and when we say deep, we mean deep β every single RSL node, value node, variable name, attribute, and literal gets copied into the return value. no shortcuts, no sharing, all yours π₯
Parameters
ast_nodeβ An RSL syntax tree to copy.
Returns
globus_rsl_copy_recursive() hands you back a copy of its input parameter that you can keep using even after ast_node and all its values have been freed. and if something goes wrong? it returns NULL. π
π int globus_rsl_eval (globus_rsl_t * ast_node, globus_symboltable_t * symbol_table)
Evaluate an RSL syntax tree.
okay so globus_rsl_eval() modifies the RSL parse tree that ast_node points to β it swaps out every RSL substitution variable reference node with the literal values those variables evaluate to, based on the current scope of the symbol table that symbol_table points to. it also squishes string concatenations together into literal string values. and any nodes that get replaced by this function? they get freed using globus_rsl_value_free_recursive(). bye bestie π«Ά
Parameters
ast_nodeβ A pointer to the RSL syntax tree to evaluate.symbol_tableβ A symbol table containing current definitions of the RSL substitutions which can occur in this evaluation scope.
Returns
on success, globus_rsl_eval() returns GLOBUS_SUCCESS, and it replaces all RSL substitution values and concatenations in ast_node or its child nodes with the evaluated forms described above. and if an error happens, globus_rsl_eval() returns a non-zero value. periodt.
π int globus_rsl_free (globus_rsl_t * ast_node)
Free an RSL syntax tree node.
globus_rsl_free() frees the RSL syntax tree node that ast_node points to. and listen, this is a shallow free β it only frees the RSL syntax tree node itself. it does not free any boolean operands, relation names, or values associated with the node. those are on their own, bestie π
Parameters
ast_nodeβ The RSL syntax tree node to free.
Returns
the globus_rsl_value_free() function always returns GLOBUS_SUCCESS. (yes, the docs really say globus_rsl_value_free() here, we don't make the rules, we just report them π)
π int globus_rsl_free_recursive (globus_rsl_t * ast_node)
Free an RSL syntax tree and all its child nodes.
globus_rsl_free_recursive() frees the RSL syntax tree that ast_node points to, including all boolean operands, attribute names, and values. so heads up: any pointers to those are no longer valid once globus_rsl_free_recursive() returns. dangling pointers are NOT the vibe, ok?
Parameters
ast_nodeβ An RSL parse tree to free.
Returns
the globus_rsl_value_free_recursive() function always returns GLOBUS_SUCCESS. (again, that's literally what the page says π
)
π globus_rsl_value_t * globus_rsl_value_copy_recursive (globus_rsl_value_t * globus_rsl_value_ptr)
Create a deep copy of an RSL value.
globus_rsl_value_copy_recursive() performs a deep copy of the RSL value that globus_rsl_value_ptr points to. all variable names, attributes, literals, and value lists get copied over into the return value. everything. the whole squad. π
Parameters
globus_rsl_value_ptrβ A pointer to an RSL value to copy.
Returns
globus_rsl_value_copy_recursive() returns a copy of its input parameter that you can use after globus_rsl_value_ptr and its values have been freed. if an error occurs, globus_rsl_value_copy_recursive() returns NULL. π
π int globus_rsl_value_eval (globus_rsl_value_t * ast_node, globus_symboltable_t * symbol_table, char ** string_value, int rsl_substitution_flag)
Evaluate RSL substitions in an RSL value node.
globus_rsl_value_eval() modifies the value that ast_node points to, replacing every RSL substitution variable reference node with the literal values those variables evaluate to, based on the current scope of the symbol table that symbol_table points to. it also combines string concatenations into literal string values. any nodes replaced by this function get freed using globus_rsl_value_free_recursive(). β¨
Parameters
ast_nodeβ A pointer to the RSL value node to evaluate.symbol_tableβ A symbol table containing current definitions of the RSL substitutions which can occur in this evaluation scope.string_valueβ An output parameter which is set to point to the value of the string returned by evaluating the value node pointed to byast_nodeif it evaluates to a literal value. list pointed to by thevalue_listparameter.rsl_substitution_flagβ A flag indicating whether the node pointed to by theast_nodeparameter defines RSL substition variables.
Returns
on success, globus_rsl_value_eval() returns GLOBUS_SUCCESS, and it replaces any RSL substitution values in the node pointed to by ast_node. if that node evaluates to a single literal, the string_value parameter gets modified to point to the value of that literal. and if an error occurs, globus_rsl_value_eval() returns a non-zero value.
π int globus_rsl_value_free (globus_rsl_value_t * val)
Free an RSL value node.
globus_rsl_value_free() frees the RSL value that val points to. and again β shallow! it only frees the RSL value node itself, not any sequence or string values associated with that node. don't @ me π
Parameters
valβ The RSL value node to free.
Returns
the globus_rsl_value_free() function always returns GLOBUS_SUCCESS. always. every time. iconic consistency π
π int globus_rsl_value_free_recursive (globus_rsl_value_t * globus_rsl_value_ptr)
Free an RSL value and all its child nodes.
globus_rsl_free_recursive() frees the RSL value node that globus_rsl_value_ptr points to, including all literal strings, variable names, and value sequences. so once globus_rsl_value_free_recursive() returns, any pointers to these are no longer valid. seriously, let them go π¦
Parameters
globus_rsl_value_ptrβ An RSL value node to free.
Returns
the globus_rsl_value_free_recursive() function always returns GLOBUS_SUCCESS.
π int globus_rsl_value_list_literal_replace (globus_list_t * value_list, char * string_value)
Replace the first value in a value list with a literal.
globus_rsl_value_list_literal_replace() swaps out the first value in the list that value_list points to with a brand-new value node β a literal string node pointing to the value of string_value β and frees the old value on the way out. out with the old, in with the literal π
Parameters
value_listβ The RSL value list to modify by replacing its first element.string_valueβ The new string value to use as a literal first element of the list pointed to by thevalue_listparameter.
Returns
on success, globus_rsl_value_list_literal_replace() returns GLOBUS_SUCCESS, frees the current first value of value_list, and replaces it with a new literal string node pointing to the value of string_value. and if an error occurs, globus_rsl_value_list_literal_replace() returns 1.
π Author π
Generated automatically by Doxygen for globus_rsl from the source code. (not a human, just a robot doing its little thing π€β¨)
okay that's the whole page bestie, you ate that π«Ά this was globus_rsl_memory(3) from globus_rsl, Version 11.4, no cap. go free your memory responsibly, mwah πππ
π¦ where this page comes from
- epel 10: globus-rsl-doc 11.4-1.el10_0 Β· Apache-2.0
- fedora 43: globus-rsl-doc 11.4-4.fc43 Β· Apache-2.0
- fedora 44: globus-rsl-doc 11.4-5.fc44 Β· Apache-2.0
- ubuntu resolute: libglobus-rsl-doc 11.4-2build2 Β· Apache-2.0
- ubuntu stonking: libglobus-rsl-doc 11.4-3 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms