43.2. slapi_valueset_add_value_ext()

Description

This function enables adding of a Slapi_Value in the Slapi_ValueSet structure without having to duplicate and free the target value. Sometimes, it is desirable to have a pass-in interface to add a Slapi_Value to a list without having to duplicate and free the target value. This function is similar to an existing function slapi_valueset_add_value() but has one more parameter, unsigned long flags, for setting flags. If SLAPI_VALUE_FLAG_PASSIN bit is set in the flags, the function would simply take over the ownership of the new value to be added without duplicating it.

Syntax

#include "slapi-plugin.h"
void slapi_valueset_add_value_ext(Slapi_ValueSet *vs, Slapi_Value *addval, unsigned long flags);

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.
flags
If SLAPI_VALUE_FLAG_PASSIN bit is set in the flags, the function would takeover the ownership of the new value to be added without duplicating it.