summaryrefslogtreecommitdiffstats
path: root/libdex/DexProto.h
diff options
context:
space:
mode:
authorCarl Shapiro <cshapiro@google.com>2011-04-27 14:16:08 -0700
committerCarl Shapiro <cshapiro@google.com>2011-04-27 14:16:08 -0700
commitbfc9799b1a53fd6f6136d07e6278d4538cf70f13 (patch)
tree40bf278711a479bd9dab3eb789ed6128424218a0 /libdex/DexProto.h
parent093bba7fc67305c514dec0fefab3e988efa05df9 (diff)
downloadandroid_dalvik-bfc9799b1a53fd6f6136d07e6278d4538cf70f13.tar.gz
android_dalvik-bfc9799b1a53fd6f6136d07e6278d4538cf70f13.tar.bz2
android_dalvik-bfc9799b1a53fd6f6136d07e6278d4538cf70f13.zip
Make libdex structures tool friendly.
Previously, the struct name and its typedef name were identical. This confuses emacs and etags. This change eliminates the typedef names and removes the extern "C" wrapping the libdex header files. To support this change the transitive C dependencies have been made to compile as C++ instead. Change-Id: I7065f32d61d776f9b09c7b461adf2502268d852f
Diffstat (limited to 'libdex/DexProto.h')
-rw-r--r--libdex/DexProto.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/libdex/DexProto.h b/libdex/DexProto.h
index a300d3fde..591c27440 100644
--- a/libdex/DexProto.h
+++ b/libdex/DexProto.h
@@ -23,10 +23,6 @@
#include "DexFile.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
* Single-thread single-string cache. This structure holds a pointer to
* a string which is semi-automatically manipulated by some of the
@@ -34,11 +30,11 @@ extern "C" {
* generally return a string that is valid until the next
* time the same DexStringCache is used.
*/
-typedef struct DexStringCache {
+struct DexStringCache {
char* value; /* the latest value */
size_t allocatedSize; /* size of the allocated buffer, if allocated */
char buffer[120]; /* buffer used to hold small-enough results */
-} DexStringCache;
+};
/*
* Make sure that the given cache can hold a string of the given length,
@@ -80,10 +76,10 @@ char* dexStringCacheAbandon(DexStringCache* pCache, const char* value);
* Method prototype structure, which refers to a protoIdx in a
* particular DexFile.
*/
-typedef struct DexProto {
+struct DexProto {
const DexFile* dexFile; /* file the idx refers to */
u4 protoIdx; /* index into proto_ids table of dexFile */
-} DexProto;
+};
/*
* Set the given DexProto to refer to the prototype of the given MethodId.
@@ -203,12 +199,12 @@ int dexProtoCompareToParameterDescriptors(const DexProto* proto,
* Single-thread prototype parameter iterator. This structure holds a
* pointer to a prototype and its parts, along with a cursor.
*/
-typedef struct DexParameterIterator {
+struct DexParameterIterator {
const DexProto* proto;
const DexTypeList* parameters;
int parameterCount;
int cursor;
-} DexParameterIterator;
+};
/*
* Initialize the given DexParameterIterator to be at the start of the
@@ -230,8 +226,4 @@ u4 dexParameterIteratorNextIndex(DexParameterIterator* pIterator);
const char* dexParameterIteratorNextDescriptor(
DexParameterIterator* pIterator);
-#ifdef __cplusplus
-}
-#endif
-
#endif /*_LIBDEX_DEXPROTO*/