Bump SourcePawn version to 1.7 to match SourceMod.
This commit is contained in:
parent
078ee76491
commit
d230711e4d
@ -882,8 +882,8 @@ static void assemble_to_buffer(MemoryBuffer *buffer, void *fin)
|
||||
// Set up the code section.
|
||||
code->header().codesize = code_buffer.length() * sizeof(cell);
|
||||
code->header().cellsize = sizeof(cell);
|
||||
code->header().codeversion = SmxConsts::CODE_VERSION_JIT2;
|
||||
code->header().flags = 0; // :TODO: CODEFLAG_DEBUG;
|
||||
code->header().codeversion = SmxConsts::CODE_VERSION_JIT_1_1;
|
||||
code->header().flags = CODEFLAG_DEBUG;
|
||||
code->header().main = 0;
|
||||
code->header().code = sizeof(sp_file_code_t);
|
||||
code->setBlob((uint8_t *)code_buffer.buffer(), code_buffer.length() * sizeof(cell));
|
||||
|
@ -50,8 +50,9 @@ struct SmxConsts
|
||||
// version higher than the current version should be rejected.
|
||||
static const uint16_t SP1_VERSION_1_0 = 0x0101;
|
||||
static const uint16_t SP1_VERSION_1_1 = 0x0102;
|
||||
static const uint16_t SP1_VERSION_1_7 = 0x0107;
|
||||
static const uint16_t SP1_VERSION_MIN = SP1_VERSION_1_0;
|
||||
static const uint16_t SP1_VERSION_MAX = SP1_VERSION_1_1;
|
||||
static const uint16_t SP1_VERSION_MAX = SP1_VERSION_1_7;
|
||||
static const uint16_t SP2_VERSION_MIN = 0x0200;
|
||||
static const uint16_t SP2_VERSION_MAX = 0x0200;
|
||||
|
||||
@ -59,11 +60,12 @@ struct SmxConsts
|
||||
static const uint8_t FILE_COMPRESSION_NONE = 0;
|
||||
static const uint8_t FILE_COMPRESSION_GZ = 1;
|
||||
|
||||
// SourcePawn 1.0.
|
||||
static const uint8_t CODE_VERSION_JIT1 = 9;
|
||||
|
||||
// SourcePawn 1.1.
|
||||
static const uint8_t CODE_VERSION_JIT2 = 10;
|
||||
// SourcePawn 1.
|
||||
static const uint8_t CODE_VERSION_JIT_1_0 = 9;
|
||||
static const uint8_t CODE_VERSION_JIT_1_1 = 10;
|
||||
static const uint8_t CODE_VERSION_JIT_1_7 = 11;
|
||||
static const uint8_t CODE_VERSION_SP1_MIN = CODE_VERSION_JIT_1_0;
|
||||
static const uint8_t CODE_VERSION_SP1_MAX = CODE_VERSION_JIT_1_1;
|
||||
|
||||
// For SP1 consumers, the container version may not be checked, but usually
|
||||
// the code version is. This constant allows newer containers to be rejected
|
||||
|
@ -161,6 +161,10 @@ typedef struct sp_fdbg_ntvarg_s
|
||||
uint32_t name; /**< Offset into debug nametable */
|
||||
} sp_fdbg_ntvarg_t;
|
||||
|
||||
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
// DO NOT DEFINE NEW STRUCTURES BELOW.
|
||||
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
#if defined __GNUC__
|
||||
# pragma pack() /* reset default packing */
|
||||
#else
|
||||
|
@ -172,9 +172,9 @@ int BaseRuntime::CreateFromMemory(sp_file_hdr_t *hdr, uint8_t *base)
|
||||
if (!(m_plugin.pcode) && !strcmp(nameptr, ".code")) {
|
||||
sp_file_code_t *cod = (sp_file_code_t *)(base + secptr->dataoffs);
|
||||
|
||||
if (cod->codeversion < SmxConsts::CODE_VERSION_JIT1)
|
||||
if (cod->codeversion < SmxConsts::CODE_VERSION_SP1_MIN)
|
||||
return SP_ERROR_CODE_TOO_OLD;
|
||||
if (cod->codeversion > SmxConsts::CODE_VERSION_JIT2)
|
||||
if (cod->codeversion > SmxConsts::CODE_VERSION_SP1_MAX)
|
||||
return SP_ERROR_CODE_TOO_NEW;
|
||||
|
||||
m_plugin.pcode = base + secptr->dataoffs + cod->code;
|
||||
|
@ -147,7 +147,7 @@ void SourcePawnEngine2::DestroyFakeNative(SPVM_NATIVE_FUNC func)
|
||||
|
||||
const char *SourcePawnEngine2::GetEngineName()
|
||||
{
|
||||
return "SourcePawn 1.3, jit-x86";
|
||||
return "SourcePawn 1.7, jit-x86";
|
||||
}
|
||||
|
||||
const char *SourcePawnEngine2::GetVersionString()
|
||||
|
Loading…
Reference in New Issue
Block a user