aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2013-07-30 11:13:27 -0700
committerTim Murray <timmurray@google.com>2013-07-31 16:13:01 -0700
commitee9d7b0e0cb74a592cef718d72b589b64997bd21 (patch)
treec4b83a787983dbc47055433eb42c4a109c4ca595
parentdde98533fad4c6534af537ae583aa4db35a1c699 (diff)
downloadslang-ee9d7b0e0cb74a592cef718d72b589b64997bd21.tar.gz
Fix a bug with compat lib support. Add new namespace to sp<>.
Change-Id: I5dd513b58757be79984dd16db63c19cc1d076658
-rw-r--r--slang_rs_reflection_cpp.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/slang_rs_reflection_cpp.cpp b/slang_rs_reflection_cpp.cpp
index 55b3d4d..a6a921a 100644
--- a/slang_rs_reflection_cpp.cpp
+++ b/slang_rs_reflection_cpp.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2012, The Android Open Source Project
+ * Copyright 2013, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -70,7 +70,7 @@ static std::string GetTypeName(const RSExportType *ET, bool Brackets = true) {
static_cast<const RSExportPointerType*>(ET)->getPointeeType();
if (PointeeType->getClass() != RSExportType::ExportClassRecord)
- return "android::sp<android::RSC::Allocation>";
+ return "android::RSC::sp<android::RSC::Allocation>";
else
return PointeeType->getElementName();
}
@@ -180,7 +180,7 @@ bool RSReflectionCpp::makeHeader(const std::string &baseClass) {
write("public:");
incIndent();
- write(mClassName + "(android::sp<android::RSC::RS> rs);");
+ write(mClassName + "(android::RSC::sp<android::RSC::RS> rs);");
write("virtual ~" + mClassName + "();");
write("");
@@ -208,12 +208,12 @@ bool RSReflectionCpp::makeHeader(const std::string &baseClass) {
if (ef->hasIn()) {
Args.push_back(std::make_pair(
- "android::sp<const android::RSC::Allocation>", "ain"));
+ "android::RSC::sp<const android::RSC::Allocation>", "ain"));
}
if (ef->hasOut() || ef->hasReturn()) {
Args.push_back(std::make_pair(
- "android::sp<const android::RSC::Allocation>", "aout"));
+ "android::RSC::sp<const android::RSC::Allocation>", "aout"));
}
const RSExportRecordType *ERT = ef->getParamPacketType();
@@ -292,9 +292,9 @@ bool RSReflectionCpp::makeImpl(const std::string &baseClass) {
stringstream ss;
const std::string &packageName = mRSContext->getReflectJavaPackageName();
ss << mClassName << "::" << mClassName
- << "(android::sp<android::RSC::RS> rs):\n"
+ << "(android::RSC::sp<android::RSC::RS> rs):\n"
" ScriptC(rs, __txt, sizeof(__txt), \""
- << mClassName << "\", " << mClassName.length()
+ << stripRS(mInputFileName) << "\", " << stripRS(mInputFileName).length()
<< ", \"/data/data/" << packageName << "/app\", sizeof(\"" << packageName << "\")) {";
write(ss);
incIndent();
@@ -324,12 +324,12 @@ bool RSReflectionCpp::makeImpl(const std::string &baseClass) {
if (ef->hasIn()) {
Args.push_back(std::make_pair(
- "android::sp<const android::RSC::Allocation>", "ain"));
+ "android::RSC::sp<const android::RSC::Allocation>", "ain"));
}
if (ef->hasOut() || ef->hasReturn()) {
Args.push_back(std::make_pair(
- "android::sp<const android::RSC::Allocation>", "aout"));
+ "android::RSC::sp<const android::RSC::Allocation>", "aout"));
}
const RSExportRecordType *ERT = ef->getParamPacketType();