From c5089298353cb63d3f02298eec0dcdb4f87c7a3e Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Fri, 24 Feb 2023 11:52:30 +0100 Subject: [PATCH] Export the function to get the gid from a label --- src/emu/task.c | 6 +++--- src/emu/task.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/emu/task.c b/src/emu/task.c index c60616c..bd12582 100644 --- a/src/emu/task.c +++ b/src/emu/task.c @@ -222,8 +222,8 @@ task_end(struct task_stack *stack, struct task *task) return 0; } -static uint32_t -get_task_type_gid(const char *label) +uint32_t +task_get_type_gid(const char *label) { uint32_t gid; @@ -266,7 +266,7 @@ task_type_create(struct task_info *info, uint32_t type_id, const char *label) return -1; } - type->gid = get_task_type_gid(label); + type->gid = task_get_type_gid(label); int n = snprintf(type->label, MAX_PCF_LABEL, "%s", label); if (n >= MAX_PCF_LABEL) { err("task type label too long: %s", label); diff --git a/src/emu/task.h b/src/emu/task.h index 0cbf115..6c81922 100644 --- a/src/emu/task.h +++ b/src/emu/task.h @@ -63,6 +63,7 @@ int task_end(struct task_stack *stack, struct task *task); struct task_type *task_type_find(struct task_type *types, uint32_t type_id); int task_type_create(struct task_info *info, uint32_t type_id, const char *label); +uint32_t task_get_type_gid(const char *label); int task_create_pcf_types(struct pcf_type *pcftype, struct task_type *types); struct task *task_get_running(struct task_stack *stack);