aboutsummaryrefslogtreecommitdiffstats
path: root/pipeline.h
diff options
context:
space:
mode:
authorLibravatar bigfoot547 <[email protected]>2025-11-15 00:19:05 -0600
committerLibravatar bigfoot547 <[email protected]>2025-11-15 00:22:03 -0600
commit468c5a136a0c458bfe7df262027ebf8c79b19558 (patch)
tree0dcf6c920422140712a8da32f67b00dc80fbac5e /pipeline.h
parentupdate some stuff (diff)
add removal test and const-qualify data
Diffstat (limited to 'pipeline.h')
-rw-r--r--pipeline.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/pipeline.h b/pipeline.h
index 562f1df..c0feb56 100644
--- a/pipeline.h
+++ b/pipeline.h
@@ -14,7 +14,7 @@
typedef struct ptx__pipeline_ctx_tag ptx_pipeline_ctx_t;
typedef struct ptx__pipeline_tag ptx_pipeline_t;
-typedef int (ptx_pipeline_proc_t)(const ptx_pipeline_ctx_t * /*ctx*/, void * /*data*/, size_t /*len*/) PIPELINE_STAGE;
+typedef int (ptx_pipeline_proc_t)(const ptx_pipeline_ctx_t * /*ctx*/, const void * /*data*/, size_t /*len*/) PIPELINE_STAGE;
typedef int (ptx_pipeline_init_proc_t)(const char * /*name*/, void ** /*ppuser*/, va_list /*init_args*/) PIPELINE_INIT;
typedef void (ptx_pipeline_cleanup_proc_t)(const char * /*name*/, void * /*puser*/) PIPELINE_CLEANUP;
@@ -30,7 +30,7 @@ ptx_pipeline_t *ptx_pipeline_new(size_t initial_size) ATTR_WUR ATTR_MALLOC() ATT
/* frees an existing pipeline stage. note that this will call the cleanup function in the stages as well. */
void ptx_pipeline_free(ptx_pipeline_t *pl);
-/* adds `stage' with `name' to `pipeline' after `after' *
+/* adds `stage' with `name' to `pipeline' after `after'
* returns: number of stages added to pipeline (0 or 1), or -1 if there was an allocation or initialization error. */
int ptx_pipeline_add_after(ptx_pipeline_t *pipeline, const struct ptx_pipeline_stage_funcs *stage, const char *name, const char *after, ...);
/* adds `stage' with `name' to `pipeline' before `before'
@@ -47,10 +47,10 @@ int ptx_pipeline_remove_stage(ptx_pipeline_t *pipeline, const char *name);
void **ptx_pipeline_ctx_get_user(const ptx_pipeline_ctx_t *ctx);
const char *ptx_pipeline_ctx_get_name(const ptx_pipeline_ctx_t *ctx);
-int ptx_pipeline_ctx_next(const ptx_pipeline_ctx_t *ctx, void *nextdata, size_t nextsize);
+int ptx_pipeline_ctx_next(const ptx_pipeline_ctx_t *ctx, const void *nextdata, size_t nextsize);
void ptx_pipeline_ctx_diag(const ptx_pipeline_ctx_t *ctx, int lvl, const char *fmt, ...) ATTR_FORMAT((printf, 3, 4)); /* TODO: pipeline stages should be able to send diagnostic messages */
-int ptx_pipeline_handle(ptx_pipeline_t *pipeline, void *data, size_t sz); /* TODO: diagnostic */
+int ptx_pipeline_handle(ptx_pipeline_t *pipeline, const void *data, size_t sz); /* TODO: diagnostic */
#endif /* include guard */