Add a function list that's used for searching functions by name.
This commit is contained in:
17
include/function_list.h
Normal file
17
include/function_list.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef LIBABACUS_FUNCTION_LIST_H
|
||||
#define LIBABACUS_FUNCTION_LIST_H
|
||||
|
||||
#include "ref_vec.h"
|
||||
|
||||
struct libab_function_list_s {
|
||||
libab_ref_vec functions;
|
||||
};
|
||||
|
||||
typedef struct libab_function_list_s libab_function_list;
|
||||
|
||||
libab_result libab_function_list_init(libab_function_list* list);
|
||||
libab_result libab_function_list_insert(libab_function_list* list,
|
||||
libab_ref* function_value);
|
||||
void libab_function_list_free(libab_function_list* list);
|
||||
|
||||
#endif
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "parsetype.h"
|
||||
#include "result.h"
|
||||
#include "table.h"
|
||||
#include "function_list.h"
|
||||
#include <string.h>
|
||||
|
||||
/**
|
||||
@@ -80,5 +81,12 @@ libab_result libab_create_table(libab_ref* into, libab_ref* parent);
|
||||
* @return the result of necessary allocations.
|
||||
*/
|
||||
libab_result libab_create_value(libab_ref* into, void* data, libab_ref* type);
|
||||
/**
|
||||
* Creates a function list object, storing it in to the given reference.
|
||||
* @param into the reference to store into.
|
||||
* @param the function_list type.
|
||||
* @return the result of the allocations.
|
||||
*/
|
||||
libab_result libab_create_function_list(libab_ref* into, libab_ref* type);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user