Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMIX_Info_load BOOL with NULL sets value to true #489

Merged
merged 2 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Chap_API_Struct.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,6 @@ \subsubsection{Info structure support macros}
\summary

Load data into a \refstruct{pmix_info_t} structure.

%%%%
\format

Expand All @@ -1411,7 +1410,13 @@ \subsubsection{Info structure support macros}
%%%%
\descr

Copy the provided data into the \refstruct{pmix_info_t}. Any data stored in the source parameters can be modified or free'd without affecting the copied data once the function has completed.
Copy the provided data into the \refstruct{pmix_info_t}. Any data stored in the source parameters can be modified or free'd without affecting the copied data once the function has completed. Passing \code{NULL} as the \code{data} parameter with a \refconst{PMIX_BOOL} \code{type} will set the associated info to \code{true}. This is a shorthand for the following where \code{NULL} replaces an explicit variable \code{true_value}:
\begin{codepar}
// A PMIX_BOOL with a NULL data is equivalent to an explicit true data
bool true_value = true;
PMIX_Info_load(&info1, PMIX_SESSION_INFO, &true_value, PMIX_BOOL);
PMIX_Info_load(&info2, PMIX_SESSION_INFO, NULL, PMIX_BOOL);
\end{codepar}

%%%%%%%%%%%
\littleheader{Copy data between info structures}
Expand Down
3 changes: 2 additions & 1 deletion Chap_Revisions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1299,8 +1299,9 @@ \section{Version 4.2: TBD}

\begin{compactitemize}
\item Define when \refattr{PMIX_PARENT_ID} is set
\item Add adefinition for \refterm{tool}
\item Add a definition for \refterm{tool}
\item Clarify \refattr{PMIX_CMD_LINE} in \refapi{PMIx_Spawn}
\item Add that using \refapi{PMIx_Info_load} with a \code{NULL} \refconst{PMIX_BOOL} data sets the value to true
\end{compactitemize}

\subsection{Deprecated constants}
Expand Down