| 147 | } |
| 148 | |
| 149 | const void *av_refstruct_ref_c(const void *obj) |
| 150 | { |
| 151 | /* Casting const away here is fine, as it is only supposed |
| 152 | * to apply to the user's data and not our bookkeeping data. */ |
| 153 | RefCount *ref = get_refcount((void*)obj); |
| 154 | |
| 155 | atomic_fetch_add_explicit(&ref->refcount, 1, memory_order_relaxed); |
| 156 | |
| 157 | return obj; |
| 158 | } |
| 159 | |
| 160 | void av_refstruct_replace(void *dstp, const void *src) |
| 161 | { |
no test coverage detected