This is an automated email from the ASF dual-hosted git repository. bhdec pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git
commit 21d9c294ae1be846ae5144ee3b25583c95594be9 Author: Brice Hamon <br...@ydotm.com> AuthorDate: Fri Nov 29 14:23:16 2019 -0500 Added RivetCache_DeleteEntry function --- src/mod_rivet_ng/mod_rivet_cache.c | 22 ++++++++++++++++++++++ src/mod_rivet_ng/mod_rivet_cache.h | 1 + 2 files changed, 23 insertions(+) diff --git a/src/mod_rivet_ng/mod_rivet_cache.c b/src/mod_rivet_ng/mod_rivet_cache.c index 721c8d9..4f997de 100644 --- a/src/mod_rivet_ng/mod_rivet_cache.c +++ b/src/mod_rivet_ng/mod_rivet_cache.c @@ -221,3 +221,25 @@ int RivetCache_StoreScript(rivet_thread_interp* rivet_interp, Tcl_HashEntry* ent } return 0; } + +/* + * -- RivetCache_DeleteEntry + * + * Cache entry delete. Removes an existing entry from a table. The memory + * associated with the entry itself will be freed, but the client is + * responsible for any cleanup associated with the entry's value, such as + * freeing a structure that it points to. + * + * Arguments: + * Tcl_HashEntry* entry object + * + * Results: + * + * Side Effects: + * + */ + +void RivetCache_DeleteEntry (Tcl_HashEntry *entry) +{ + Tcl_DeleteHashEntry (entry); +} diff --git a/src/mod_rivet_ng/mod_rivet_cache.h b/src/mod_rivet_ng/mod_rivet_cache.h index 2f54827..a316f51 100644 --- a/src/mod_rivet_ng/mod_rivet_cache.h +++ b/src/mod_rivet_ng/mod_rivet_cache.h @@ -31,5 +31,6 @@ EXTERN char* RivetCache_MakeKey (apr_pool_t* pool, char* filename, EXTERN Tcl_HashEntry* RivetCache_EntryLookup (rivet_thread_interp* rivet_interp,char* hashKey,int* isNew); EXTERN Tcl_Obj* RivetCache_FetchScript (Tcl_HashEntry* entry); EXTERN int RivetCache_StoreScript(rivet_thread_interp* rivet_interp, Tcl_HashEntry* entry, Tcl_Obj* script); +EXTERN void RivetCache_DeleteEntry (Tcl_HashEntry *entry); #endif /* __mod_rivet_cache_h__ */ --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@tcl.apache.org For additional commands, e-mail: commits-h...@tcl.apache.org