Skip to content

Commit

Permalink
Merge pull request #1715 from docEdub/230611-make-hash-table-function…
Browse files Browse the repository at this point in the history
…s-available-to-plugins-in-cs7

Make hash table functions available to plugins in cs7
  • Loading branch information
vlazzarini committed Jun 11, 2023
2 parents 596667d + b8d5999 commit 8df826f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
12 changes: 10 additions & 2 deletions Top/csound.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,10 +548,18 @@ static const CSOUND cenviron_ = {
csoundCepsLP,
csoundLPrms,
csoundCreateThread2,
cs_hash_table_create,
cs_hash_table_get,
cs_hash_table_put,
cs_hash_table_remove,
cs_hash_table_free,
cs_hash_table_get_key,
cs_hash_table_keys,
cs_hash_table_values,
csoundPeekCircularBuffer,
{
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL
NULL, NULL, NULL
},
/* ------- private data (not to be used by hosts or externals) ------- */
/* callback function pointers */
Expand Down
11 changes: 10 additions & 1 deletion include/csoundCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -1424,11 +1424,20 @@ typedef struct _message_queue_t_ {
MYFLT* (*CepsLP)(CSOUND *, MYFLT *, MYFLT *, int, int);
MYFLT (*LPrms)(CSOUND *, void *);
void *(*CreateThread2)(uintptr_t (*threadRoutine)(void *), unsigned int, void *userdata);
CS_HASH_TABLE *(*CreateHashTable)(CSOUND *);
void *(*GetHashTableValue)(CSOUND *, CS_HASH_TABLE *, char *);
void (*SetHashTableValue)(CSOUND *, CS_HASH_TABLE *, char *, void *);
void (*RemoveHashTableKey)(CSOUND *, CS_HASH_TABLE *, char *);
void (*DestroyHashTable)(CSOUND *, CS_HASH_TABLE *);
char *(*GetHashTableKey)(CSOUND *, CS_HASH_TABLE *, char *);
CONS_CELL *(*GetHashTableKeys)(CSOUND *, CS_HASH_TABLE *);
CONS_CELL *(*GetHashTableValues)(CSOUND *, CS_HASH_TABLE *);
int (*PeekCircularBuffer)(CSOUND *csound, void *p, void *out, int items);
/**@}*/
/** @name Placeholders
To allow the API to grow while maintining backward binary compatibility. */
/**@{ */
SUBR dummyfn_2[22];
SUBR dummyfn_2[13];
/**@}*/
#ifdef __BUILDING_LIBCSOUND
/* ------- private data (not to be used by hosts or externals) ------- */
Expand Down

0 comments on commit 8df826f

Please sign in to comment.