feat(stellar_mq subscribe api): replace cb_arg with plugin_id

This commit is contained in:
yangwei
2024-09-09 14:14:59 +08:00
parent a24214cbee
commit 6403e832de
11 changed files with 48 additions and 68 deletions

View File

@@ -90,10 +90,10 @@ int exdata_new_index(struct exdata_schema *s, const char *name, exdata_free *fre
/*******************************
* STELLAR EXDATA HANDLE API *
*******************************/
struct exdata_handle *exdata_handle_new(struct exdata_schema *s)
struct exdata_runtime *exdata_handle_new(struct exdata_schema *s)
{
if(s==NULL || s->exdata_meta_array==NULL)return NULL;
struct exdata_handle *h = CALLOC(struct exdata_handle, 1);
struct exdata_runtime *h = CALLOC(struct exdata_runtime, 1);
h->schema=s;
unsigned int len = utarray_len(s->exdata_meta_array);
if(len > 0)
@@ -103,7 +103,7 @@ struct exdata_handle *exdata_handle_new(struct exdata_schema *s)
return h;
}
void exdata_handle_reset(struct exdata_handle *h)
void exdata_handle_reset(struct exdata_runtime *h)
{
if(h==NULL||h->schema==NULL||h->exdata_array==NULL)return;
unsigned int len=utarray_len(h->schema->exdata_meta_array);
@@ -125,7 +125,7 @@ void exdata_handle_reset(struct exdata_handle *h)
return;
}
void exdata_handle_free(struct exdata_handle *h)
void exdata_handle_free(struct exdata_runtime *h)
{
if(h==NULL)return;
exdata_handle_reset(h);
@@ -134,7 +134,7 @@ void exdata_handle_free(struct exdata_handle *h)
}
int exdata_set(struct exdata_handle *h, int idx, void *ex_ptr)
int exdata_set(struct exdata_runtime *h, int idx, void *ex_ptr)
{
if(h==NULL || h->schema == NULL|| h->exdata_array == NULL)return -1;
unsigned int len=utarray_len(h->schema->exdata_meta_array);
@@ -144,7 +144,7 @@ int exdata_set(struct exdata_handle *h, int idx, void *ex_ptr)
return 0;
}
void *exdata_get(struct exdata_handle *h, int idx)
void *exdata_get(struct exdata_runtime *h, int idx)
{
if(h==NULL || h->schema == NULL|| h->exdata_array == NULL)return NULL;
unsigned int len = utarray_len(h->schema->exdata_meta_array);