IPlugin context pointer is passed now to natives

Added basic string natives
Added floating point natives

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40230
This commit is contained in:
Borja Ferrer
2006-12-23 02:20:53 +00:00
parent 2fb3501e0d
commit aba273f93d
5 changed files with 403 additions and 3 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ namespace SourcePawn
struct sp_context_s;
typedef cell_t (*SPVM_NATIVE_FUNC)(struct sp_context_s *, const cell_t *);
typedef cell_t (*SPVM_NATIVE_FUNC)(SourcePawn::IPluginContext *, const cell_t *);
/**********************************************
*** The following structures are bound to the VM/JIT.
+3 -2
View File
@@ -1776,11 +1776,12 @@ cell_t NativeCallback(sp_context_t *ctx, ucell_t native_idx, cell_t *params)
return 0;
}
return native->pfn(ctx, params);
return native->pfn(ctx->context, params);
}
cell_t InvalidNative(sp_context_t *ctx, const cell_t *params)
static cell_t InvalidNative(IPluginContext *pCtx, const cell_t *params)
{
sp_context_t *ctx = pCtx->GetContext();
ctx->err = SP_ERROR_INVALID_NATIVE;
return 0;