Sun Java System Directory Server Enterprise Edition 6.1 Developer's Guide

slapi_valueset_add_value_optimised()

Adds a Slapi_Value in the Slapi_ValueSet structure.

Syntax

#include "slapi-plugin.h"
 void slapi_valueset_add_value_optimised(Slapi_ValueSet *vs,
    const Slapi_Value *addval, void *syntax_plugin);

Parameters

This function takes the following parameters:

vs

Pointer to the Slapi_ValueSet structure to which to add the value.

addval

Pointer to the Slapi_Value to add to the Slapi_ValueSet.

syntax_plugin

Pointer to the plug-in for this attribute type, obtained using slapi_attr_get_plugin().

Description

This function adds a value in the form of a Slapi_Value structure in a Slapi_ValueSet structure.

Memory Concerns

The value is duplicated from the Slapi_Value structure, which can be freed from memory after using it without altering the Slapi_ValueSet structure.

This function does not verify if the value is already present in the Slapi_ValueSet structure. You can manually check this using slapi_valueset_first_value_const() and slapi_valueset_next_value_const() .

See Also

slapi_valueset_first_value_const()

slapi_valueset_next_value_const()