[util] Rename PL_ParseDictionary to PL_ParseStruct

Struct is far more appropriate for its function, and I need to parse a
dictionary into a hash table.
This commit is contained in:
Bill Currie 2020-12-24 13:33:37 +09:00
parent 5c0ce2c414
commit cb2bdb0224
4 changed files with 7 additions and 7 deletions

View file

@ -342,8 +342,8 @@ void PL_Free (plitem_t *item);
\param context Additional context data passed to the parser.
\return 0 if there are any errors, 1 if there are no errors.
*/
int PL_ParseDictionary (const plfield_t *fields, const plitem_t *dict,
void *data, plitem_t *messages, void *context);
int PL_ParseStruct (const plfield_t *fields, const plitem_t *dict,
void *data, plitem_t *messages, void *context);
int PL_ParseArray (const plfield_t *fields, const plitem_t *dict,
void *data, plitem_t *messages, void *context);
void __attribute__((format(printf,3,4)))

View file

@ -1144,8 +1144,8 @@ pl_default_parser (const plfield_t *field, const plitem_t *item, void *data,
}
VISIBLE int
PL_ParseDictionary (const plfield_t *fields, const plitem_t *dict, void *data,
plitem_t *messages, void *context)
PL_ParseStruct (const plfield_t *fields, const plitem_t *dict, void *data,
plitem_t *messages, void *context)
{
void **list, **l;
dictkey_t *current;

View file

@ -109,7 +109,7 @@
[self outname]);
fprintf (output_file, "{\n");
fprintf (output_file,
"\treturn PL_ParseDictionary (%s_fields, item, data, messages,"
"\treturn PL_ParseStruct (%s_fields, item, data, messages,"
" context);\n",
[self outname]);
fprintf (output_file, "}\n");

View file

@ -392,8 +392,8 @@ QFV_ParseRenderPass (vulkan_ctx_t *ctx, plitem_t *plist)
cexpr_init_symtab (&vars_tab, &exprctx);
if (!PL_ParseDictionary (renderpass_fields, plist,
&renderpass_data, messages, &parsectx)) {
if (!PL_ParseStruct (renderpass_fields, plist, &renderpass_data,
messages, &parsectx)) {
for (int i = 0; i < PL_A_NumObjects (messages); i++) {
Sys_Printf ("%s\n", PL_String (PL_ObjectAtIndex (messages, i)));
}