33.27. slapi_mods_add_smod()

Appends a new smod to a Slapi_Mods structure. The mod passed in is not copied or duplicated, but the reference is used directly.
Description

This function appends a new smod to a Slapi_Mods. The function slapi_mods_get_num_mods() gives the number of mods in the Slapi_Mods structure.

Syntax

#include "slapi-plugin.h"
void slapi_mods_add_smod( Slapi_Mods *smods, Slapi_Mod *smod );

Parameters

This function takes the following parameters:

mods
Pointer to an initialized Slapi_Mods.
smod
Pointer to an initialized Slapi_Mod.
Memory Concerns

This function must not be used on a Slapi_Mods initialized with slapi_mods_init_byref().