diff options
author | Austin Henriksen <austin@zeroc.com> | 2019-10-30 05:14:29 -0400 |
---|---|---|
committer | Joe George <joe@zeroc.com> | 2021-02-01 16:46:35 -0500 |
commit | 452f57976a135c8b72fc8d8f580d5d50618c0cae (patch) | |
tree | 0233eedd3cdc380126fd613b04b8b468beb289c0 /cpp/src/slice2php | |
parent | Remove IcePatch2 (#602) (diff) | |
download | ice-452f57976a135c8b72fc8d8f580d5d50618c0cae.tar.bz2 ice-452f57976a135c8b72fc8d8f580d5d50618c0cae.tar.xz ice-452f57976a135c8b72fc8d8f580d5d50618c0cae.zip |
Remove checksum support (#607)
* Removed checksum sources from swift mapping project file.
* Removed checksum tests from Python.
* Removed checksum from Python mapping.
* Removed checksum tests from PHP mapping.
* Removed checksum support from PHP mapping.
* Removed checksum sources from MATLAB project file.
* Removed checksum option from slice2x manpages.
* Removed checksum sources from JavaScript mapping.
* Removed checksum tests from Java mapping.
* Removed outdated checksum metadata from Java mapping.
* Removed checksum support from Java mapping.
* Removed checksum tests from csharp.
* Removed checksum support from csharp mapping.
* Removed checksum tests from cpp
* Removed checksum support from IceBox.
* Removed checksum support from IceStorm.
* Removed Slice checksum support from IceGrid.
* Fixed broken filters file for Slice VS project.
* Removed checksum support from cpp mapping.
* Removed checksum support from Slice definitions.
* Removed checksum support from cpp98 mapping.
Diffstat (limited to 'cpp/src/slice2php')
-rw-r--r-- | cpp/src/slice2php/Main.cpp | 58 |
1 files changed, 2 insertions, 56 deletions
diff --git a/cpp/src/slice2php/Main.cpp b/cpp/src/slice2php/Main.cpp index 89693422fc6..1fc644ae23c 100644 --- a/cpp/src/slice2php/Main.cpp +++ b/cpp/src/slice2php/Main.cpp @@ -11,7 +11,6 @@ #include <IceUtil/Mutex.h> #include <IceUtil/MutexPtrLock.h> #include <IceUtil/ConsoleUtil.h> -#include <Slice/Checksum.h> #include <Slice/Preprocessor.h> #include <Slice/FileTracker.h> #include <Slice/PHPUtil.h> @@ -1484,7 +1483,7 @@ CodeVisitor::collectExceptionMembers(const ExceptionPtr& p, MemberInfoList& allM } static void -generate(const UnitPtr& un, bool all, bool checksum, bool ns, const vector<string>& includePaths, Output& out) +generate(const UnitPtr& un, bool all, bool ns, const vector<string>& includePaths, Output& out) { if(!all) { @@ -1518,55 +1517,6 @@ generate(const UnitPtr& un, bool all, bool checksum, bool ns, const vector<strin CodeVisitor codeVisitor(out, ns); un->visit(&codeVisitor, false); - if(checksum) - { - ChecksumMap checksums = createChecksums(un); - if(!checksums.empty()) - { - out << sp; - if(ns) - { - out << "namespace"; // Global namespace. - out << sb; - out << "new Ice\\SliceChecksumInit(array("; - for(ChecksumMap::const_iterator p = checksums.begin(); p != checksums.end();) - { - out << nl << "\"" << p->first << "\" => \""; - ostringstream str; - str.flags(ios_base::hex); - str.fill('0'); - for(vector<unsigned char>::const_iterator q = p->second.begin(); q != p->second.end(); ++q) - { - str << static_cast<int>(*q); - } - out << str.str() << "\""; - if(++p != checksums.end()) - { - out << ","; - } - } - out << "));"; - out << eb; - } - else - { - out << nl << "global $Ice_sliceChecksums;"; - for(ChecksumMap::const_iterator p = checksums.begin(); p != checksums.end(); ++p) - { - out << nl << "$Ice_sliceChecksums[\"" << p->first << "\"] = \""; - ostringstream str; - str.flags(ios_base::hex); - str.fill('0'); - for(vector<unsigned char>::const_iterator q = p->second.begin(); q != p->second.end(); ++q) - { - str << static_cast<int>(*q); - } - out << str.str() << "\";"; - } - } - } - } - out << nl; // Trailing newline. } @@ -1640,7 +1590,6 @@ usage(const string& n) "--validate Validate command line options.\n" "--all Generate code for Slice definitions in included files.\n" "--no-namespace Do not use PHP namespaces (deprecated).\n" - "--checksum Generate checksums for Slice definitions.\n" "--ice Allow reserved Ice prefix in Slice identifiers\n" " deprecated: use instead [[\"ice-prefix\"]] metadata.\n" "--underscore Allow underscores in Slice identifiers\n" @@ -1667,7 +1616,6 @@ compile(const vector<string>& argv) opts.addOpt("", "ice"); opts.addOpt("", "underscore"); opts.addOpt("", "all"); - opts.addOpt("", "checksum"); opts.addOpt("n", "no-namespace"); bool validate = find(argv.begin(), argv.end(), "--validate") != argv.end(); @@ -1736,8 +1684,6 @@ compile(const vector<string>& argv) bool all = opts.isSet("all"); - bool checksum = opts.isSet("checksum"); - bool ns = !opts.isSet("no-namespace"); if(args.empty()) @@ -1891,7 +1837,7 @@ compile(const vector<string>& argv) // // Generate the PHP mapping. // - generate(u, all, checksum, ns, includePaths, out); + generate(u, all, ns, includePaths, out); out << "?>\n"; out.close(); |