diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-01-06 20:12:03 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-01-06 20:12:03 +0000 |
commit | 9e6d35490a6542f9c97607f93c2ef8ca8e03cbcc (patch) | |
tree | dd2a1ddf0476664c2b823409c36cbccd52662ca7 /packages/Python/lldbsuite/test/lang/c/shared_lib/foo.c | |
parent | 3bd2e91faeb9eeec1aae82c64a3253afff551cfd (diff) |
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test/lang/c/shared_lib/foo.c')
-rw-r--r-- | packages/Python/lldbsuite/test/lang/c/shared_lib/foo.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/packages/Python/lldbsuite/test/lang/c/shared_lib/foo.c b/packages/Python/lldbsuite/test/lang/c/shared_lib/foo.c new file mode 100644 index 000000000000..6431bc496c30 --- /dev/null +++ b/packages/Python/lldbsuite/test/lang/c/shared_lib/foo.c @@ -0,0 +1,22 @@ +#include "foo.h" +#include <stdlib.h> + +struct foo +{ + struct sub_foo sub_element; + int other_element; +}; + +struct foo * +GetMeAFoo() +{ + struct foo *ret_val = (struct foo *) malloc (sizeof (struct foo)); + ret_val->other_element = 3; + return ret_val; +} + +struct sub_foo * +GetMeASubFoo (struct foo *in_foo) +{ + return &(in_foo->sub_element); +} |