diff options
author | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-31 11:32:28 +0000 |
---|---|---|
committer | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-31 11:32:28 +0000 |
commit | 818aa27a9d44e62f19cfdf757ac03ec9da2f730b (patch) | |
tree | 49528e471745d355044dd87f134f7f247f9e521f /src/target/target.h | |
parent | 4deb42ed004f90058856b1d72dda63c4843b3854 (diff) |
First step in hiding target_type_s from public interface:
- Add DEFINE_TARGET_TYPE_S symbol in files that need it defined.
- Forward declare 'struct target_type_s' only, unless that symbol is defined.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1969 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target/target.h')
-rw-r--r-- | src/target/target.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/target/target.h b/src/target/target.h index 1eb1ba1b..dc871bf2 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -105,7 +105,8 @@ typedef struct working_area_s struct working_area_s *next; } working_area_t; -typedef struct target_type_s +#ifdef DEFINE_TARGET_TYPE_S +struct target_type_s { /** * Name of the target. Do @b not access this field directly, use @@ -258,7 +259,11 @@ typedef struct target_type_s int (*virt2phys)(struct target_s *target, u32 address, u32 *physical); int (*mmu)(struct target_s *target, int *enabled); -} target_type_t; +}; +#else +struct target_type_s; +#endif // DEFINE_TARGET_TYPE_S +typedef struct target_type_s target_type_t; /* forward decloration */ typedef struct target_event_action_s target_event_action_t; |