| 66 | } |
| 67 | |
| 68 | void |
| 69 | Object::copyFrom(const Object &obj) |
| 70 | { |
| 71 | if (!this->borrowed) { |
| 72 | if (this->instance != nullptr) { |
| 73 | suscan_object_destroy(this->instance); |
| 74 | this->instance = nullptr; |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | if (obj.isHollow()) { |
| 79 | this->borrowed = true; |
| 80 | this->instance = nullptr; |
| 81 | } else { |
| 82 | this->borrowed = false; |
| 83 | SU_ATTEMPT(this->instance = suscan_object_copy(obj.instance)); |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | void |
| 88 | Object::clear(void) |
no test coverage detected