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

slapi_value_new_string()

Allocates a new Slapi_Value structure and initializes it from a string.

Syntax

#include "slapi-plugin.h"
 Slapi_Value * slapi_value_new_string(const char *s);

Parameters

This function takes the following parameter:

s

NULL terminated string used to initialize the newly allocated Slapi_Value.

Returns

This function returns a pointer to the newly allocated Slapi_Value. If space cannot be allocated (for example, if no more virtual memory exists), the slapd program will terminate.

Description

This function returns a Slapi_Value structure containing a value duplicated from the string passed as the parameter.

Memory Concerns

When you are no longer using the value, you should free it from memory by calling slapi_value_free().

See Also

slapi_value_dup()

slapi_value_free()

slapi_value_new()

slapi_value_new_berval()