|
|
@@ -472,6 +472,12 @@ static SQRESULT bf_table_clear(HSQUIRRELVM v)
|
|
|
return sq_clear(v,-1);
|
|
|
}
|
|
|
|
|
|
+static SQRESULT bf_obj_clone(HSQUIRRELVM v)
|
|
|
+{
|
|
|
+ SQRESULT rc = sq_clone(v,-1);
|
|
|
+ if(rc != SQ_OK) return rc;
|
|
|
+ return 1;
|
|
|
+}
|
|
|
static SQRESULT bf_table_len(HSQUIRRELVM v)
|
|
|
{
|
|
|
v->Push(SQInteger(sq_getsize(v,2)));
|
|
|
@@ -583,6 +589,7 @@ static SQRegFunction base_funcs[]={
|
|
|
{_SC("table_setdelegate"),bf_table_setdelegate,3, _SC(".t t|o")},
|
|
|
{_SC("table_getdelegate"),bf_table_getdelegate,2, _SC(".t")},
|
|
|
{_SC("table_getdelegate_squirrel"),bf_table_getdelegate_squirrel,1, _SC(".")},
|
|
|
+ {_SC("obj_clone"),bf_obj_clone,2, _SC(". t|a|x")},
|
|
|
{NULL,(SQFUNCTION)0,0,NULL}
|
|
|
};
|
|
|
|