libamxc  1.10.3
C Generic Data Containers
variant_list.c
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** SPDX-License-Identifier: BSD-2-Clause-Patent
4 **
5 ** SPDX-FileCopyrightText: Copyright (c) 2023 SoftAtHome
6 **
7 ** Redistribution and use in source and binary forms, with or without modification,
8 ** are permitted provided that the following conditions are met:
9 **
10 ** 1. Redistributions of source code must retain the above copyright notice,
11 ** this list of conditions and the following disclaimer.
12 **
13 ** 2. Redistributions in binary form must reproduce the above copyright notice,
14 ** this list of conditions and the following disclaimer in the documentation
15 ** and/or other materials provided with the distribution.
16 **
17 ** Subject to the terms and conditions of this license, each copyright holder
18 ** and contributor hereby grants to those receiving rights under this license
19 ** a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
20 ** (except for failure to satisfy the conditions of this license) patent license
21 ** to make, have made, use, offer to sell, sell, import, and otherwise transfer
22 ** this software, where such license applies only to those patent claims, already
23 ** acquired or hereafter acquired, licensable by such copyright holder or contributor
24 ** that are necessarily infringed by:
25 **
26 ** (a) their Contribution(s) (the licensed copyrights of copyright holders and
27 ** non-copyrightable additions of contributors, in source or binary form) alone;
28 ** or
29 **
30 ** (b) combination of their Contribution(s) with the work of authorship to which
31 ** such Contribution(s) was added by such copyright holder or contributor, if,
32 ** at the time the Contribution is added, such addition causes such combination
33 ** to be necessarily infringed. The patent license shall not apply to any other
34 ** combinations which include the Contribution.
35 **
36 ** Except as expressly stated above, no rights or licenses from any copyright
37 ** holder or contributor is granted under this license, whether expressly, by
38 ** implication, estoppel or otherwise.
39 **
40 ** DISCLAIMER
41 **
42 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
43 ** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
44 ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
45 ** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
46 ** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
47 ** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
48 ** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
49 ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
50 ** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
51 ** USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
52 **
53 ****************************************************************************/
54 
55 #include <stdlib.h>
56 #include <string.h>
57 
58 #include <amxc/amxc_string.h>
59 #include <amxc/amxc_string_join.h>
60 #include <amxc_variant_priv.h>
61 
62 static int variant_list_init(amxc_var_t* const var) {
63  return amxc_llist_init(&var->data.vl);
64 }
65 
69 }
70 
73 }
74 
75 static int variant_list_copy_list(amxc_var_t* const dest,
76  const amxc_llist_t* source_list) {
77  int retval = -1;
78 
79  amxc_llist_for_each(it, source_list) {
80  amxc_var_t* var = NULL;
82  when_null(item, exit);
83  when_failed(amxc_var_new(&var), exit);
84  if(amxc_var_copy(var, item) != 0) {
86  goto exit;
87  }
88  amxc_llist_append(&dest->data.vl, &var->lit);
89  }
90 
91  retval = 0;
92 
93 exit:
94  return retval;
95 }
96 
97 static int variant_list_copy(amxc_var_t* const dest,
98  const amxc_var_t* const src) {
99  const amxc_llist_t* list = &src->data.vl;
100  return variant_list_copy_list(dest, list);
101 }
102 
103 static int variant_list_move(amxc_var_t* const dest,
104  amxc_var_t* const src) {
105  amxc_llist_t* src_list = &src->data.vl;
106  amxc_llist_t* dst_list = &dest->data.vl;
107  return amxc_llist_move(dst_list, src_list);
108 }
109 
110 static int variant_list_to_csv_string(amxc_var_t* const dest,
111  const amxc_var_t* const src) {
112  int retval = -1;
113  amxc_string_t string;
114  amxc_string_init(&string, 0);
115  retval = amxc_string_csv_join_var(&string, src);
116  free(dest->data.s);
117  dest->data.s = amxc_string_take_buffer(&string);
118  amxc_string_clean(&string);
119  return retval;
120 }
121 
122 static int variant_list_to_ssv_string(amxc_var_t* const dest,
123  const amxc_var_t* const src) {
124  int retval = -1;
125  amxc_string_t string;
126  amxc_string_init(&string, 0);
127  retval = amxc_string_ssv_join_var(&string, src);
128  free(dest->data.s);
129  dest->data.s = amxc_string_take_buffer(&string);
130  amxc_string_clean(&string);
131  return retval;
132 }
133 
134 static int variant_list_to_number(amxc_var_t* const dest,
135  const amxc_var_t* const src) {
136  int retval = -1;
137 
138  amxc_var_t intermediate;
139  intermediate.type_id = AMXC_VAR_ID_UINT64;
140  intermediate.data.ui64 = amxc_llist_size(&src->data.vl);
141 
142  retval = amxc_var_convert(dest, &intermediate, dest->type_id);
143 
144  return retval;
145 }
146 
147 static int variant_list_to_bool(amxc_var_t* const dest,
148  const amxc_var_t* const src) {
149  dest->data.b = !amxc_llist_is_empty(&src->data.vl);
150 
151  return 0;
152 }
153 
154 static int variant_list_to_htable(amxc_var_t* const dest,
155  const amxc_var_t* const src) {
156  int retval = -1;
157  amxc_var_t index;
158  const amxc_llist_t* list = &src->data.vl;
159 
160  amxc_var_init(&index);
161  index.type_id = AMXC_VAR_ID_UINT64;
162  index.data.ui64 = 0;
163 
164  amxc_llist_for_each(it, list) {
165  amxc_var_t* copy = NULL;
167  char* key = amxc_var_dyncast(cstring_t, &index);
168  when_null(key, exit);
169 
170  if(amxc_var_new(&copy) != 0) {
171  free(key);
172  goto exit;
173  }
174  if(amxc_var_copy(copy, item) != 0) {
175  amxc_var_delete(&copy);
176  free(key);
177  goto exit;
178  }
179  if(amxc_htable_insert(&dest->data.vm, key, &copy->hit) != 0) {
180  amxc_var_delete(&copy);
181  free(key);
182  goto exit;
183  }
184  free(key);
185  index.data.ui64++;
186  }
187 
188  retval = 0;
189 
190 exit:
191  amxc_var_clean(&index);
192  return retval;
193 }
194 
195 static int variant_list_convert_to(amxc_var_t* const dest,
196  const amxc_var_t* const src) {
197  int retval = -1;
198 
215  NULL,
216  NULL,
220  };
221 
222  if(dest->type_id >= AMXC_VAR_ID_CUSTOM_BASE) {
223  goto exit;
224  }
225 
226  if(convfn[dest->type_id] != NULL) {
227  if(dest->type_id == AMXC_VAR_ID_ANY) {
229  }
230  retval = convfn[dest->type_id](dest, src);
231  }
232 
233 exit:
234  return retval;
235 }
236 
238  const int64_t index,
239  int flags) {
240  amxc_var_t* retval = NULL;
241  const amxc_llist_t* llist = &src->data.vl;
242  amxc_llist_it_t* lit = NULL;
243  amxc_var_t* src_var = NULL;
244 
245  when_true(index < 0, exit);
246  lit = amxc_llist_get_at(llist, index);
247  when_null(lit, exit);
248 
249  src_var = amxc_llist_it_get_data(lit, amxc_var_t, lit);
250  if((flags & AMXC_VAR_FLAG_COPY) == AMXC_VAR_FLAG_COPY) {
251  when_failed(amxc_var_new(&retval), exit);
252  when_failed(amxc_var_copy(retval, src_var), exit);
253  } else {
254  retval = src_var;
255  }
256 
257 exit:
258  return retval;
259 }
260 
261 static int variant_list_set_index(amxc_var_t* const dest,
262  amxc_var_t* const src,
263  const int64_t index,
264  int flags) {
265  int retval = -1;
266  amxc_var_t* dest_var = NULL;
267  amxc_llist_t* llist = &dest->data.vl;
268  amxc_llist_it_t* current_lit = NULL;
269 
270  when_true(index > (int64_t) (amxc_llist_size(llist) + 1), exit);
271  current_lit = amxc_llist_get_at(llist, index);
272 
273  if((flags & AMXC_VAR_FLAG_COPY) == AMXC_VAR_FLAG_COPY) {
274  if(current_lit != NULL) {
275  if((flags & AMXC_VAR_FLAG_UPDATE) == AMXC_VAR_FLAG_UPDATE) {
276  dest_var = amxc_llist_it_get_data(current_lit, amxc_var_t, lit);
277  when_failed(amxc_var_copy(dest_var, src), exit);
278  } else {
279  when_failed(amxc_var_new(&dest_var), exit);
280  when_failed(amxc_var_copy(dest_var, src), exit);
281  when_failed(amxc_llist_it_insert_before(current_lit, &dest_var->lit), exit);
282  }
283  } else {
284  when_failed(amxc_var_new(&dest_var), exit);
285  when_failed(amxc_var_copy(dest_var, src), exit);
286  when_failed(amxc_llist_append(llist, &dest_var->lit), exit);
287  }
288  } else {
289  if(current_lit != NULL) {
290  if((flags & AMXC_VAR_FLAG_UPDATE) == AMXC_VAR_FLAG_UPDATE) {
291  when_failed(amxc_llist_it_insert_before(current_lit, &src->lit), exit);
293  } else {
294  when_failed(amxc_llist_it_insert_before(current_lit, &src->lit), exit);
295  }
296  } else {
297  when_failed(amxc_llist_append(llist, &src->lit), exit);
298  }
299  }
300  retval = 0;
301 
302 exit:
303  if((current_lit == NULL) && (retval != 0)) {
304  amxc_var_delete(&dest_var);
305  }
306  return retval;
307 }
308 
309 static amxc_var_t* variant_list_get_key(const amxc_var_t* const src,
310  const char* const key,
311  int flags) {
312  char* endptr = NULL;
313  int64_t index = strtoll(key, &endptr, 0);
314  if(*endptr != 0) {
315  return NULL;
316  } else {
317  return variant_list_get_index(src, index, flags);
318  }
319 }
320 
321 static int variant_list_set_key(amxc_var_t* const dest,
322  amxc_var_t* const src,
323  const char* const key,
324  int flags) {
325  char* endptr = NULL;
326  int64_t index = strtoll(key, &endptr, 0);
327 
328  if(*endptr != 0) {
329  return -1;
330  } else {
331  return variant_list_set_index(dest, src, index, flags);
332  }
333 }
334 
335 static int variant_list_compare(const amxc_var_t* const lval,
336  const amxc_var_t* const rval,
337  int* const result) {
338  int ret = 0;
340 
342  when_null_status(r_it, exit, *result = 1);
343 
346  result);
347  when_false((ret == 0) && (*result == 0), exit);
348 
349  r_it = amxc_llist_it_get_next(r_it);
350  }
351 
352  if(r_it != NULL) {
353  *result = -1;
354  }
355 
356 exit:
357  return ret;
358 }
359 
362  .del = variant_list_delete,
363  .copy = variant_list_copy,
364  .move = variant_list_move,
365  .convert_from = NULL,
366  .convert_to = variant_list_convert_to,
367  .compare = variant_list_compare,
368  .get_key = variant_list_get_key,
369  .set_key = variant_list_set_key,
370  .get_index = variant_list_get_index,
371  .set_index = variant_list_set_index,
372  .type_id = 0,
373  .hit = { .ait = NULL, .key = NULL, .next = NULL },
374  .name = AMXC_VAR_NAME_LIST
375 };
376 
377 CONSTRUCTOR static void amxc_var_list_init(void) {
379 }
380 
383 }
384 
386  amxc_llist_t* llist = NULL;
387  amxc_llist_it_t* it = NULL;
388  amxc_var_t variant;
389  when_null(var, exit);
390 
391  amxc_var_init(&variant);
393 
394  if(amxc_llist_new(&llist) != 0) {
395  amxc_var_clean(&variant);
396  goto exit;
397  }
398 
399  it = amxc_llist_take_first(&variant.data.vl);
400  while(it != NULL) {
402  it = amxc_llist_take_first(&variant.data.vl);
403  }
404 
405  amxc_var_clean(&variant);
406 
407 exit:
408  return llist;
409 }
410 
412  const amxc_llist_t* retval = NULL;
413  when_null(var, exit);
415 
416  retval = &var->data.vl;
417 
418 exit:
419  return retval;
420 }
421 
423  const amxc_llist_t* list) {
424  amxc_var_t* subvar = NULL;
425 
426  when_null(var, exit);
427  subvar = amxc_var_add_new(var);
428  when_null(subvar, exit);
429 
431  when_null(list, exit);
432 
433  if(variant_list_copy_list(subvar, list) != 0) {
434  amxc_var_delete(&subvar);
435  }
436 
437 exit:
438  return subvar;
439 }
440 
442  const char* key,
443  const amxc_llist_t* list) {
444  amxc_var_t* subvar = NULL;
445 
446  when_null(var, exit);
447  subvar = amxc_var_add_new_key(var, key);
448  when_null(subvar, exit);
449 
451  when_null(list, exit);
452 
453  if(variant_list_copy_list(subvar, list) != 0) {
454  amxc_var_delete(&subvar);
455  }
456 
457 exit:
458  return subvar;
459 }
#define when_failed(x, l)
Definition: amxc_macros.h:142
#define when_true(x, l)
Definition: amxc_macros.h:134
#define CONSTRUCTOR
Definition: amxc_macros.h:86
#define when_null(x, l)
Definition: amxc_macros.h:126
#define when_false(x, l)
Definition: amxc_macros.h:138
#define when_null_status(x, l, c)
Definition: amxc_macros.h:150
#define DESTRUCTOR
Definition: amxc_macros.h:90
Ambiorix string API header file.
#define cstring_t
Convenience macro.
Definition: amxc_variant.h:584
#define amxc_var_from_llist_it(ll_it)
Get the variant pointer from an amxc linked list iterator.
Definition: amxc_variant.h:799
int PRIVATE amxc_var_default_convert_to_null(amxc_var_t *const dest, const amxc_var_t *const src)
uint32_t PRIVATE amxc_var_add_type(amxc_var_type_t *const type, const uint32_t index)
int PRIVATE amxc_var_remove_type(amxc_var_type_t *const type)
int amxc_htable_insert(amxc_htable_t *const htable, const char *const key, amxc_htable_it_t *const it)
Inserts an item in the hash table.
Definition: amxc_htable.c:237
int amxc_llist_it_insert_before(amxc_llist_it_t *const reference, amxc_llist_it_t *const it)
Inserts an iterator before a reference interator in the list.
AMXC_INLINE amxc_llist_it_t * amxc_llist_it_get_next(const amxc_llist_it_t *const reference)
Gets the next iterator in the list.
Definition: amxc_llist.h:824
void amxc_llist_it_clean(amxc_llist_it_t *const it, amxc_llist_it_delete_t func)
Removes the iterator from the list and frees allocated memory.
#define amxc_llist_it_get_data(it, type, member)
Gets the data pointer from a linked list iterator.
Definition: amxc_llist.h:238
int amxc_llist_move(amxc_llist_t *const dest, amxc_llist_t *const src)
Moves all items from one linked list to another linked list.
Definition: amxc_llist.c:135
size_t amxc_llist_size(const amxc_llist_t *const llist)
Calculates the size of the linked list.
Definition: amxc_llist.c:151
int amxc_llist_new(amxc_llist_t **llist)
Allocates a linked list.
Definition: amxc_llist.c:88
int amxc_llist_append(amxc_llist_t *const llist, amxc_llist_it_t *const it)
Adds an item to the end of the linked list.
Definition: amxc_llist.c:169
#define amxc_llist_iterate(it, list)
Loops over the list from head to tail.
Definition: amxc_llist.h:270
int amxc_llist_init(amxc_llist_t *const llist)
Initializes a linked list.
Definition: amxc_llist.c:111
bool amxc_llist_is_empty(const amxc_llist_t *const llist)
Checks that the linked list is empty.
Definition: amxc_llist.c:165
amxc_llist_it_t * amxc_llist_get_at(const amxc_llist_t *const llist, const unsigned int index)
Gets an item at a certain position of the linked list.
Definition: amxc_llist.c:222
void amxc_llist_clean(amxc_llist_t *const llist, amxc_llist_it_delete_t func)
Removes all items from the linked list.
Definition: amxc_llist.c:124
AMXC_INLINE amxc_llist_it_t * amxc_llist_take_first(amxc_llist_t *const llist)
Removes the first item from the linked list.
Definition: amxc_llist.h:752
#define amxc_llist_for_each(it, list)
Loops over the list from head to tail.
Definition: amxc_llist.h:253
AMXC_INLINE amxc_llist_it_t * amxc_llist_get_first(const amxc_llist_t *const llist)
Gets the first item of the linked list.
Definition: amxc_llist.h:713
int amxc_string_csv_join_var(amxc_string_t *string, const amxc_var_t *const var)
Joins a variant containing a list of variants into a single string using ',' as separator.
int amxc_string_ssv_join_var(amxc_string_t *string, const amxc_var_t *const var)
Joins a variant containing a list of variants into a single string using ' ' as separator.
int amxc_string_init(amxc_string_t *const string, const size_t length)
Initializes a string.
Definition: amxc_string.c:163
void amxc_string_clean(amxc_string_t *const string)
Frees the string buffer and reset length attributes.
Definition: amxc_string.c:189
char * amxc_string_take_buffer(amxc_string_t *const string)
Takes the string buffer.
Definition: amxc_string.c:356
#define AMXC_VAR_FLAG_COPY
Copy the variant, creates a new variant, leaves the source variant untouched.
Definition: amxc_variant.h:398
#define AMXC_VAR_FLAG_UPDATE
Replaces the value of the variant, leaves the source variant untouched.
Definition: amxc_variant.h:404
const amxc_llist_t * amxc_var_get_const_amxc_llist_t(const amxc_var_t *const var)
Conversion helper function.
Definition: variant_list.c:411
void variant_list_it_free(amxc_llist_it_t *it)
Helper functions, can be used as delete function for linked lists.
Definition: variant_list.c:66
amxc_llist_t * amxc_var_get_amxc_llist_t(const amxc_var_t *const var)
Conversion helper function.
Definition: variant_list.c:385
amxc_var_t * amxc_var_add_new_amxc_llist_t(amxc_var_t *const var, const amxc_llist_t *list)
Conversion helper function.
Definition: variant_list.c:422
amxc_var_t * amxc_var_add_new_key_amxc_llist_t(amxc_var_t *const var, const char *key, const amxc_llist_t *list)
Conversion helper function.
Definition: variant_list.c:441
#define AMXC_VAR_ID_CUSTOM_BASE
Base variant id for custom variants.
Definition: amxc_variant.h:257
#define AMXC_VAR_NAME_LIST
Provides a name for variant id AMXC_VAR_ID_LIST.
Definition: amxc_variant.h:348
#define AMXC_VAR_ID_UINT64
Unsigned 64 bit integer variant id.
Definition: amxc_variant.h:182
#define AMXC_VAR_ID_ANY
Special variant id, typically used in cast or conversion functions.
Definition: amxc_variant.h:247
#define AMXC_VAR_ID_LIST
Ambiorix Linked List variant id.
Definition: amxc_variant.h:206
int(* amxc_var_convert_fn_t)(amxc_var_t *const dest, const amxc_var_t *const src)
Variant type callback function prototype for dynamically converting one type to another.
int amxc_var_set_type(amxc_var_t *const var, const uint32_t type)
Change the variant data type.
Definition: amxc_variant.c:261
#define amxc_var_dyncast(type, var)
Dynamic cast a variant to a certain type.
Definition: amxc_variant.h:678
int amxc_var_new(amxc_var_t **var)
Allocates a variant and initializes it to the null variant type.
Definition: amxc_variant.c:194
int amxc_var_init(amxc_var_t *const var)
Initializes a variant.
Definition: amxc_variant.c:223
amxc_var_t * amxc_var_add_new(amxc_var_t *const var)
Adds a new variant to a composite variant.
Definition: amxc_variant.c:551
int amxc_var_copy(amxc_var_t *const dest, const amxc_var_t *const src)
Copy the type and data from one variant (source) in another variant (destination).
Definition: amxc_variant.c:285
void amxc_var_clean(amxc_var_t *const var)
Clean-up and reset variant.
Definition: amxc_variant.c:237
void amxc_var_delete(amxc_var_t **var)
Frees the previously allocated variant.
Definition: amxc_variant.c:207
amxc_var_t * amxc_var_add_new_key(amxc_var_t *const var, const char *key)
Adds a new variant with a key to a composite variant.
Definition: amxc_variant.c:526
int amxc_var_convert(amxc_var_t *const dest, const amxc_var_t *src, const uint32_t type_id)
Converts one variant (source) to another variant(destination) using the specified variant type id.
Definition: amxc_variant.c:333
int amxc_var_compare(const amxc_var_t *const var1, const amxc_var_t *const var2, int *const result)
Compares two variants.
Definition: amxc_variant.c:397
#define amxc_var_constcast(type, var)
Takes the content from a variant.
Definition: amxc_variant.h:722
The linked list iterator structure.
Definition: amxc_llist.h:215
The linked list structure.
Definition: amxc_llist.h:228
The string structure.
Definition: amxc_string.h:103
A variant type structure.
amxc_var_new_fn_t init
The variant struct definition.
Definition: amxc_variant.h:861
void * data
Definition: amxc_variant.h:883
amxc_llist_it_t lit
Definition: amxc_variant.h:862
amxc_htable_it_t hit
Definition: amxc_variant.h:863
uint32_t type_id
Definition: amxc_variant.h:864
static amxc_htable_it_t it[2000]
static amxc_llist_t * llist
static amxc_var_t * var
Definition: test_issue_58.c:77
static int variant_list_init(amxc_var_t *const var)
Definition: variant_list.c:62
static int variant_list_copy(amxc_var_t *const dest, const amxc_var_t *const src)
Definition: variant_list.c:97
static int variant_list_compare(const amxc_var_t *const lval, const amxc_var_t *const rval, int *const result)
Definition: variant_list.c:335
static DESTRUCTOR void amxc_var_list_cleanup(void)
Definition: variant_list.c:381
static int variant_list_set_key(amxc_var_t *const dest, amxc_var_t *const src, const char *const key, int flags)
Definition: variant_list.c:321
static amxc_var_t * variant_list_get_key(const amxc_var_t *const src, const char *const key, int flags)
Definition: variant_list.c:309
static int variant_list_convert_to(amxc_var_t *const dest, const amxc_var_t *const src)
Definition: variant_list.c:195
static int variant_list_to_ssv_string(amxc_var_t *const dest, const amxc_var_t *const src)
Definition: variant_list.c:122
static amxc_var_t * variant_list_get_index(const amxc_var_t *const src, const int64_t index, int flags)
Definition: variant_list.c:237
static int variant_list_to_csv_string(amxc_var_t *const dest, const amxc_var_t *const src)
Definition: variant_list.c:110
static void variant_list_delete(amxc_var_t *var)
Definition: variant_list.c:71
static int variant_list_move(amxc_var_t *const dest, amxc_var_t *const src)
Definition: variant_list.c:103
static int variant_list_to_htable(amxc_var_t *const dest, const amxc_var_t *const src)
Definition: variant_list.c:154
static int variant_list_to_bool(amxc_var_t *const dest, const amxc_var_t *const src)
Definition: variant_list.c:147
static int variant_list_copy_list(amxc_var_t *const dest, const amxc_llist_t *source_list)
Definition: variant_list.c:75
static CONSTRUCTOR void amxc_var_list_init(void)
Definition: variant_list.c:377
static int variant_list_to_number(amxc_var_t *const dest, const amxc_var_t *const src)
Definition: variant_list.c:134
static int variant_list_set_index(amxc_var_t *const dest, amxc_var_t *const src, const int64_t index, int flags)
Definition: variant_list.c:261
static amxc_var_type_t amxc_variant_list
Definition: variant_list.c:360