1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2026-01-20 22:24:38 +01:00

Update the constructor binding to take into account new changes made to the overload binding for constructors.

This commit is contained in:
Sandu Liviu Catalin
2019-02-17 17:10:42 +02:00
parent bb73f0a8b5
commit baee2d5c33
2 changed files with 27 additions and 21 deletions

View File

@@ -559,7 +559,7 @@ protected:
string overloadName;
overloadName.reserve(15);
SqOverloadName::Get(name, argCount, overloadName);
// Push object/environment
sq_pushobject(vm, GetObject());
// Bind overload handler
@@ -583,8 +583,8 @@ protected:
sq_setnativeclosurename(vm, -1, overloadName.c_str());
// Include it into the object
sq_newslot(vm, -3, staticVar);
sq_pop(vm,1); // pop object
// pop object/environment
sq_pop(vm, 1);
}
// Set the value of a variable on the object. Changes to values set this way are not reciprocated