rt_func_object.inline.h 738 B

1234567891011121314151617181920212223242526272829
  1. #ifndef AFUN_RT_FUNC_OBJECT_INLINE_H
  2. #define AFUN_RT_FUNC_OBJECT_INLINE_H
  3. #include "rt_func_object.h"
  4. namespace aFunrt {
  5. Function::CallFunction::ArgCodeList::ArgCodeList(const aFuncode::Code::ByteCode *code_) : code{code_}, ret{nullptr} {
  6. }
  7. Function::CallFunction::ArgCodeList::~ArgCodeList() {
  8. if (ret != nullptr)
  9. ret->delReference();
  10. }
  11. aFuncore::Object *Function::CallFunction::ArgCodeList::setObject(Object *res) {
  12. Object *obj = ret;
  13. ret = res;
  14. if (ret != nullptr)
  15. ret->addReference();
  16. return obj;
  17. }
  18. aFuncore::Object *Function::CallFunction::ArgCodeList::getObject() {
  19. return ret;
  20. }
  21. };
  22. #endif //AFUN_RT_FUNC_OBJECT_INLINE_H