1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* Copyright © 2023-2024 Apple Inc. */
#ifndef MLX_OBJECT_H
#define MLX_OBJECT_H
#include "mlx/c/string.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* \defgroup mlx_object Object
* MLX object general methods.
*/
/**@{*/
/**
* Returns a new string representing the object.
*/
mlx_string mlx_tostring(void* obj);
/**
* Increases the reference count of the object.
*/
void mlx_retain(void* obj);
/**
* Decreases the reference count of the object, and free if it gets to zero.
*/
void mlx_free(void* obj);
/**@}*/
#ifdef __cplusplus
}
#endif
#endif