MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / insert_name

Function insert_name

src/yvalve/user_dsql.cpp:1157–1184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1155
1156
1157static dsql_name* insert_name(const TEXT* symbol_name, dsql_name** list_ptr, dsql_stmt* stmt)
1158{
1159/**************************************
1160 *
1161 * i n s e r t _ n a m e
1162 *
1163 **************************************
1164 *
1165 * Functional description
1166 * Add the name to the designated list.
1167 *
1168 **************************************/
1169 const USHORT l = name_length(symbol_name);
1170 dsql_name* name = (dsql_name*) gds__alloc((SLONG) sizeof(dsql_name) + l);
1171 // FREE: by exit handler cleanup() or database_cleanup()
1172 if (!name) // NOMEM:
1173 error_post(Arg::Gds(isc_virmemexh));
1174 name->name_stmt = stmt;
1175 name->name_length = l;
1176 memcpy(name->name_symbol, symbol_name, l);
1177
1178 if ((name->name_next = *list_ptr))
1179 name->name_next->name_prev = name;
1180 *list_ptr = name;
1181 name->name_prev = NULL;
1182
1183 return name;
1184}
1185
1186
1187static dsql_name* lookup_name(const TEXT* name, dsql_name* list)

Calls 3

error_postFunction · 0.85
GdsClass · 0.85
name_lengthFunction · 0.70

Tested by

no test coverage detected