Main Page | Class List | Directories | File List | Class Members | File Members

slarrmis.c File Reference

#include "slinclud.h"
#include "slang.h"
#include "_slang.h"

Go to the source code of this file.

Functions

int SLang_get_array_element (SLang_Array_Type *at, SLindex_Type *indices, VOID_STAR data)
int SLang_set_array_element (SLang_Array_Type *at, SLindex_Type *indices, VOID_STAR data)


Function Documentation

int SLang_get_array_element SLang_Array_Type at,
SLindex_Type indices,
VOID_STAR  data
 

Definition at line 28 of file slarrmis.c.

References _pSLarray_aget_transfer_elem(), _pSLang_Array_Type::flags, _pSLang_Array_Type::sizeof_type, and SLARR_DATA_VALUE_IS_POINTER.

00029 {
00030    int is_ptr;
00031 
00032    if ((at == NULL)
00033        || (indices == NULL)
00034        || (data == NULL))
00035      return -1;
00036 
00037    is_ptr = (at->flags & SLARR_DATA_VALUE_IS_POINTER);
00038    if (is_ptr) *(VOID_STAR *) data = NULL;
00039    return _pSLarray_aget_transfer_elem (at, indices, data, at->sizeof_type, is_ptr);
00040 }

int SLang_set_array_element SLang_Array_Type at,
SLindex_Type indices,
VOID_STAR  data
 

Definition at line 42 of file slarrmis.c.

References _pSLarray_aput_transfer_elem(), _pSLang_Array_Type::flags, _pSLang_Array_Type::sizeof_type, and SLARR_DATA_VALUE_IS_POINTER.

Referenced by _pSLns_list_namespaces(), and _pSLnspace_apropos().

00043 {
00044    if ((at == NULL)
00045        || (indices == NULL)
00046        || (data == NULL))
00047      return -1;
00048    
00049    return _pSLarray_aput_transfer_elem (at, indices, data, at->sizeof_type,
00050                                        at->flags & SLARR_DATA_VALUE_IS_POINTER);
00051 }


© sourcejam.com 2005-2008