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:
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user