--- a/src/ai/api/ai_list.hpp.sq Thu Jul 19 16:17:10 2007 +0000
+++ b/src/ai/api/ai_list.hpp.sq Thu Jul 19 17:13:38 2007 +0000
@@ -6,7 +6,7 @@
template <> AIList &GetParam(ForceType<AIList &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIList *)instance; }
template <> const AIList *GetParam(ForceType<const AIList *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIList *)instance; }
template <> const AIList &GetParam(ForceType<const AIList &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIList *)instance; }
- template <> int Return<AIList *>(HSQUIRRELVM vm, AIList *res) { HSQOBJECT instance; Squirrel::CreateClassInstanceVM(vm, "AIList", res, &instance, DefSQDestructorCallback<AIList>); sq_pushobject(vm, instance); return 1; }
+ template <> int Return<AIList *>(HSQUIRRELVM vm, AIList *res) { res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIList", res, NULL, DefSQDestructorCallback<AIList>); return 1; }
}; // namespace SQConvert
void SQAIListRegister(Squirrel *engine) {