@@ -104,7 +104,7 @@ typedef struct IN__EXPORTS
104104 /// \param name A name to use for the module. If the module data does not contain a name, this will be used.
105105 /// \param err A pointer to an integer that receives an error code should the function fail. Not valid until
106106 /// FinalizeEnvironment() is called.
107- void (* AddModule )(Environment * env , const void * data , uint64_t size , const char * name , int * err );
107+ void (* AddModule )(Environment * env , const void * data , size_t size , const char * name , int * err );
108108
109109 /// Adds a prebuilt module object to the environment. This happens synchronously, regardless of multithreading flags.
110110 /// \param env The environment to modify.
@@ -128,7 +128,7 @@ typedef struct IN__EXPORTS
128128 /// \param size The length of the memory that the
129129 /// data pointer points to. If size is 0, the data pointer is actually a null terminated UTF8 encoded file path.
130130 /// \param name_override Resolves all functions in this embedded library as raw C functions with the given module name.
131- enum IN_ERROR (* AddEmbedding )(Environment * env , int tag , const void * data , uint64_t size , const char * name_override );
131+ enum IN_ERROR (* AddEmbedding )(Environment * env , int tag , const void * data , size_t size , const char * name_override );
132132
133133 /// Tells the linker to export the given symbol from the resulting binary.
134134 /// \param env The environment to modify.
@@ -204,6 +204,15 @@ typedef struct IN__EXPORTS
204204 /// \param global_index The index of the linear memory to retrieve.
205205 INGlobal * (* LoadMemoryIndex )(void * assembly , uint32_t module_index , uint32_t memory_index );
206206
207+ /// Searches for an exported function with the given name in a table and replaces the function pointer with another.
208+ /// \param assembly A pointer to a WebAssembly binary loaded by LoadAssembly.
209+ /// \param module_index The index of the module the table is exported from.
210+ /// \param table_index The index of the table to search through.
211+ /// \param function Name of the exported function to search the table for.
212+ /// \param replace function pointer to another function that should replace the function's table entry
213+ int (* ReplaceTableFuncPtr )(void * assembly , uint32_t module_index , uint32_t table_index , const char * function ,
214+ IN_Entrypoint replace );
215+
207216 /// Clears the environment's cached compilation of a given module, or clears the entire cache if the module is a null
208217 /// pointer.
209218 /// \param env The environment to clear.
0 commit comments