Files
test2/intern/memutil/intern/MEM_RefCountedC-Api.cpp
2023-06-15 13:35:34 +10:00

26 lines
598 B
C++

/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \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;
}