blob: 6942426ecb3b421e7a5445bff70a32141ab0f621 (
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
|
#include "protected-data-1.h"
int protected_data_1a __attribute__ ((visibility("protected"))) = 1;
int protected_data_1b __attribute__ ((visibility("protected"))) = 2;
int *
protected_data_1a_p (void)
{
return &protected_data_1a;
}
int *
protected_data_1b_p (void)
{
return &protected_data_1b;
}
void
set_protected_data_1a (int i)
{
protected_data_1a = i;
}
void
set_protected_data_1b (int i)
{
protected_data_1b = i;
}
int
check_protected_data_1a (int i)
{
return protected_data_1a == i ? 0 : 1;
}
int
check_protected_data_1b (int i)
{
return protected_data_1b == i ? 0 : 1;
}
|