Welcome to mirror list, hosted at ThFree Co, Russian Federation.

MEM_RefCountedC-Api.cpp « intern « memutil « intern - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 179e5ebdc241b9992416e62d5af2c5f1d3b03ff5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* SPDX-License-Identifier: GPL-2.0-or-later
 * Copyright 2001-2002 NaN Holding BV. All rights reserved. */

/** \file
 * \ingroup intern_memutil
 */

#include "MEM_RefCountedC-Api.h"
#include "MEM_RefCounted.h"

int MEM_RefCountedGetRef(MEM_TRefCountedObjectPtr shared)
{
  return shared ? ((MEM_RefCounted *)shared)->getRef() : 0;
}

int MEM_RefCountedIncRef(MEM_TRefCountedObjectPtr shared)
{
  return shared ? ((MEM_RefCounted *)shared)->incRef() : 0;
}

int MEM_RefCountedDecRef(MEM_TRefCountedObjectPtr shared)
{
  return shared ? ((MEM_RefCounted *)shared)->decRef() : 0;
}