Syntax
ITEM *ItemPutNI( ITEM *item, int value );
Arguments
item is an existing ITEM to replace. Pass NULL to allocate a new ITEM.
value is the signed int to store.
Return value
The destination ITEM, or a new caller-owned ITEM when item is NULL.
Description
Sets the type to IT_INTEGER. Read it with ItemGetNI(). Release a newly allocated ITEM with ItemRelease().
Example
#include "xdev-wtui.h"
#include <stdio.h>
int main( void )
{
ITEM *item = ItemPutNI( NULL, 42 );
printf( "%d\n", ItemGetNI( item ) );
ItemRelease( item );
return 0;
}
Output
42