summaryrefslogtreecommitdiffstats
path: root/dexlist
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 /dexlist
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 'dexlist')
-rw-r--r--dexlist/Android.mk2
-rw-r--r--dexlist/DexList.cpp (renamed from dexlist/DexList.c)4
2 files changed, 3 insertions, 3 deletions
diff --git a/dexlist/Android.mk b/dexlist/Android.mk
index aacdfb530..a7dd6e280 100644
--- a/dexlist/Android.mk
+++ b/dexlist/Android.mk
@@ -18,7 +18,7 @@
LOCAL_PATH:= $(call my-dir)
dexdump_src_files := \
- DexList.c
+ DexList.cpp
dexdump_c_includes := \
dalvik \
diff --git a/dexlist/DexList.c b/dexlist/DexList.cpp
index 532669204..03f023040 100644
--- a/dexlist/DexList.c
+++ b/dexlist/DexList.cpp
@@ -63,7 +63,7 @@ static char* descriptorToDot(const char* str)
str++; /* Skip the 'L'. */
}
- newStr = malloc(at + 1); /* Add one for the '\0'. */
+ newStr = (char*)malloc(at + 1); /* Add one for the '\0'. */
newStr[at] = '\0';
while (at > 0) {
@@ -217,7 +217,7 @@ int process(const char* fileName)
}
mapped = true;
- pDexFile = dexFileParse(map.addr, map.length, kDexParseDefault);
+ pDexFile = dexFileParse((u1*)map.addr, map.length, kDexParseDefault);
if (pDexFile == NULL) {
fprintf(stderr, "Warning: DEX parse failed for '%s'\n", fileName);
goto bail;