blob: 4df4eddc3494a79b2340daabc111aa39b3bc11ca (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#include "regress.h"
#include "regressextra.h"
#include <glib-object.h>
struct _RegressTestBoxedCWrapper
{
RegressTestBoxedC * cptr;
};
RegressTestBoxedCWrapper *
regress_test_boxed_c_wrapper_new (void)
{
RegressTestBoxedCWrapper *boxed;
boxed = g_slice_new (RegressTestBoxedCWrapper);
boxed->cptr = regress_test_boxed_c_new ();
return boxed;
}
RegressTestBoxedCWrapper *
regress_test_boxed_c_wrapper_copy (RegressTestBoxedCWrapper *self)
{
RegressTestBoxedCWrapper *ret_boxed;
ret_boxed = g_slice_new (RegressTestBoxedCWrapper);
ret_boxed->cptr = g_boxed_copy (regress_test_boxed_c_get_type(), self->cptr);
return ret_boxed;
}
static void
regress_test_boxed_c_wrapper_free (RegressTestBoxedCWrapper *boxed)
{
g_boxed_free (regress_test_boxed_c_get_type(), boxed->cptr);
g_slice_free (RegressTestBoxedCWrapper, boxed);
}
G_DEFINE_BOXED_TYPE(RegressTestBoxedCWrapper,
regress_test_boxed_c_wrapper,
regress_test_boxed_c_wrapper_copy,
regress_test_boxed_c_wrapper_free);
/**
* regress_test_boxed_c_wrapper_get
* @self: a #RegressTestBoxedCWrapper objects
*
* Returns: (transfer none): associated #RegressTestBoxedC
**/
RegressTestBoxedC *
regress_test_boxed_c_wrapper_get (RegressTestBoxedCWrapper *self)
{
return self->cptr;
}
|