summaryrefslogtreecommitdiff
path: root/cpp/src/slice2py/Main.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2009-09-03 14:03:30 -0700
committerMark Spruiell <mes@zeroc.com>2009-09-03 14:03:30 -0700
commitee4f02ccf6e41d1c453c124c7623f742c56b306e (patch)
tree797d2a2ba25d60f85a0fb503f64c959bb2ce9872 /cpp/src/slice2py/Main.cpp
parentPartial fix for 4210 - Update to latest Berkeley DB 4.7.25 (diff)
downloadice-ee4f02ccf6e41d1c453c124c7623f742c56b306e.tar.bz2
ice-ee4f02ccf6e41d1c453c124c7623f742c56b306e.tar.xz
ice-ee4f02ccf6e41d1c453c124c7623f742c56b306e.zip
bug 4229 - generate Python docstrings
Diffstat (limited to 'cpp/src/slice2py/Main.cpp')
-rw-r--r--cpp/src/slice2py/Main.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/cpp/src/slice2py/Main.cpp b/cpp/src/slice2py/Main.cpp
index 6f2d99e4584..ef4fb9db7d0 100644
--- a/cpp/src/slice2py/Main.cpp
+++ b/cpp/src/slice2py/Main.cpp
@@ -80,7 +80,7 @@ interruptedCallback(int signal)
//
// Inside __init__.py we add an import statement for Foo_ice, causing
// Foo_ice to be imported implicitly when M is imported.
-//
+//
// Of course, another Slice file Bar.ice may contain definitions for the
// same Slice module M, in which case the __init__.py file for M is modified
// to contain an additional import statement for Bar_ice. Therefore a
@@ -167,7 +167,7 @@ PackageVisitor::visitModuleStart(const ModulePtr& p)
{
addSubmodule(path, fixIdent(*q));
}
-
+
path += "/" + *q;
createDirectory(path);
@@ -232,7 +232,7 @@ PackageVisitor::createDirectory(const string& dir)
}
#ifdef _WIN32
result = _mkdir(dir.c_str());
-#else
+#else
result = mkdir(dir.c_str(), S_IRWXU | S_IRWXG | S_IRWXO);
#endif
@@ -386,7 +386,7 @@ void
usage(const char* n)
{
getErrorStream() << "Usage: " << n << " [options] slice-files...\n";
- getErrorStream() <<
+ getErrorStream() <<
"Options:\n"
"-h, --help Show this message.\n"
"-v, --version Display the Ice version.\n"
@@ -422,7 +422,7 @@ compile(int argc, char* argv[])
opts.addOpt("", "no-package");
opts.addOpt("", "checksum");
opts.addOpt("", "prefix", IceUtilInternal::Options::NeedArg);
-
+
vector<string> args;
try
{
@@ -498,11 +498,12 @@ compile(int argc, char* argv[])
IceUtil::CtrlCHandler ctrlCHandler;
ctrlCHandler.setCallback(interruptedCallback);
-
+ bool keepComments = true;
+
for(i = args.begin(); i != args.end(); ++i)
{
Preprocessor icecpp(argv[0], *i, cppArgs);
- FILE* cppHandle = icecpp.preprocess(false);
+ FILE* cppHandle = icecpp.preprocess(keepComments);
if(cppHandle == 0)
{