| 101 | } |
| 102 | |
| 103 | void Register_MapFuncs() { |
| 104 | SIType *types; |
| 105 | SIType ret_type; |
| 106 | AR_FuncDesc *func_desc; |
| 107 | |
| 108 | types = array_new(SIType, 1); |
| 109 | array_append(types, SI_ALL); |
| 110 | ret_type = T_MAP; |
| 111 | func_desc = AR_FuncDescNew("tomap", AR_TOMAP, 0, VAR_ARG_LEN, types, ret_type, true, true); |
| 112 | AR_RegFunc(func_desc); |
| 113 | |
| 114 | types = array_new(SIType, 1); |
| 115 | array_append(types, T_NULL | T_MAP | T_NODE | T_EDGE); |
| 116 | ret_type = T_NULL | T_ARRAY; |
| 117 | func_desc = AR_FuncDescNew("keys", AR_KEYS, 1, 1, types, ret_type, false, true); |
| 118 | AR_RegFunc(func_desc); |
| 119 | |
| 120 | types = array_new(SIType, 1); |
| 121 | array_append(types, T_NULL | T_MAP | T_NODE | T_EDGE); |
| 122 | ret_type = T_NULL | T_MAP; |
| 123 | func_desc = AR_FuncDescNew("properties", AR_PROPERTIES, 1, 1, types, ret_type, false, true); |
| 124 | AR_RegFunc(func_desc); |
| 125 | |
| 126 | types = array_new(SIType, 2); |
| 127 | array_append(types, T_NULL | T_MAP); |
| 128 | array_append(types, T_NULL | T_MAP); |
| 129 | ret_type = T_NULL | T_MAP; |
| 130 | func_desc = AR_FuncDescNew("merge_maps", AR_MERGEMAP, 2, 2, types, ret_type, true, true); |
| 131 | AR_RegFunc(func_desc); |
| 132 | } |
| 133 |
no test coverage detected