aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/eo/access/access_main.c
blob: 61cd3811679af3fef8132ff0f6b28b3dec429f09 (plain) (blame)
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
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

#include "Eo.h"
#include "access_simple.h"
#include "access_inherit.h"

int
main(int argc, char *argv[])
{
   (void) argc;
   (void) argv;
   eo_init();

   Eo *obj = eo_add(INHERIT_CLASS, NULL);

   eo_do(obj, simple_a_set(1), inherit_prot_print());

   Simple_Public_Data *pd = eo_data_scope_get(obj, SIMPLE_CLASS);
   printf("Pub: %d\n", pd->public_x2);

   eo_unref(obj);
   eo_shutdown();
   return 0;
}