1.1 --- a/sourcepawn/include/sp_vm_api.h Sat Sep 23 23:37:40 2006 +0000
1.2 +++ b/sourcepawn/include/sp_vm_api.h Sun Sep 24 06:17:10 2006 +0000
1.3 @@ -59,7 +59,7 @@
1.4 virtual void FreeBaseContext(IPluginContext *ctx) =0;
1.5
1.6 /**
1.7 - * Allocates memory.
1.8 + * Allocates large blocks of temporary memory.
1.9 *
1.10 * @param size Size of memory to allocate.
1.11 * @return Pointer to memory, NULL if allocation failed.
1.12 @@ -72,6 +72,21 @@
1.13 * @param mem Memory address to free.
1.14 */
1.15 virtual void BaseFree(void *memory) =0;
1.16 +
1.17 + /**
1.18 + * Allocates executable memory.
1.19 + *
1.20 + * @param size Size of memory to allocate.
1.21 + * @return Pointer to memory, NULL if allocation failed.
1.22 + */
1.23 + virtual void *ExecAlloc(size_t size) =0;
1.24 +
1.25 + /**
1.26 + * Frees executable memory.
1.27 + *
1.28 + * @param mem Address to free.
1.29 + */
1.30 + virtual void ExecFree(void *address) =0;
1.31 };
1.32
1.33 class ICompilation
1.34 @@ -107,14 +122,14 @@
1.35 virtual bool SetCompilationOption(ICompilation *co, const char *key, const char *val) =0;
1.36
1.37 /**
1.38 - * Finalizes a compilation into a new IContext.
1.39 + * Finalizes a compilation into a new sp_context_t.
1.40 * Note: This will free the ICompilation pointer.
1.41 *
1.42 * @param co Compilation pointer.
1.43 * @param err Filled with error code on exit.
1.44 * @return New plugin context.
1.45 */
1.46 - virtual IPluginContext *CompileToContext(ICompilation *co, int *err) =0;
1.47 + virtual sp_context_t *CompileToContext(ICompilation *co, int *err) =0;
1.48
1.49 /**
1.50 * Aborts a compilation and frees the ICompilation pointer.
1.51 @@ -128,7 +143,7 @@
1.52 *
1.53 * @param ctx Context structure pointer.
1.54 */
1.55 - virtual void FreeContextVars(sp_context_t *ctx) =0;
1.56 + virtual void FreeContext(sp_context_t *ctx) =0;
1.57
1.58 /**
1.59 * Calls the "execute" function on a context.