Difference between revisions of "Truxton options destroy"
Jump to navigation
Jump to search
(Created page with "This destroys an options object. =Syntax= <syntaxhighlight lang="C"> void truxton_options_destroy( uint64_t options_handle ); </syntaxhighlight> =Parameters= ==<code>options...") |
|||
| (2 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
=Syntax= | =Syntax= | ||
| − | < | + | <source lang="C"> |
void truxton_options_destroy( uint64_t options_handle ); | void truxton_options_destroy( uint64_t options_handle ); | ||
| − | </ | + | </source> |
=Parameters= | =Parameters= | ||
| − | ==<code>options_handle </code>== | + | ==<code>options_handle</code>== |
The handle to the options object created by calling the <code>[[truxton_options_create]]</code> function. | The handle to the options object created by calling the <code>[[truxton_options_create]]</code> function. | ||
| Line 14: | Line 14: | ||
=Sample= | =Sample= | ||
| − | < | + | <source lang="C" highlight="14"> |
void process_free(void) | void process_free(void) | ||
{ | { | ||
uint64_t options = truxton_options_create(); | uint64_t options = truxton_options_create(); | ||
| − | if ( truxton_options_get_boolean("pfree") == 1 ) | + | if ( truxton_options_get_boolean( "pfree" ) == 1 ) |
{ | { | ||
printf( "Yes, we will process free space\n" ); | printf( "Yes, we will process free space\n" ); | ||
| Line 28: | Line 28: | ||
} | } | ||
| − | truxton_options_destroy(options); | + | truxton_options_destroy( options ); |
} | } | ||
| − | </ | + | </source> |
Latest revision as of 14:06, 9 February 2021
This destroys an options object.
Syntax
void truxton_options_destroy( uint64_t options_handle );
Parameters
options_handle
The handle to the options object created by calling the truxton_options_create function.
Return value
A handle to an options object.
Sample
void process_free(void)
{
uint64_t options = truxton_options_create();
if ( truxton_options_get_boolean( "pfree" ) == 1 )
{
printf( "Yes, we will process free space\n" );
}
else
{
printf( "No, we will not process free space\n" );
}
truxton_options_destroy( options );
}