[asterisk-scf-commits] asterisk-scf/release/ice.git branch "visitor-generators" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Jan 6 22:30:38 UTC 2011


branch "visitor-generators" has been updated
       via  b76d02dd1b89eeb591063b1886d53077c1238e9a (commit)
      from  3f6f12b9137aef4f937bbb42e3c3256cf23d3968 (commit)

Summary of changes:
 py/modules/IcePy/Slice.cpp |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)


- Log -----------------------------------------------------------------
commit b76d02dd1b89eeb591063b1886d53077c1238e9a
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Thu Jan 6 16:30:19 2011 -0600

    Add plugin support to Ice for Python dynamic code generation.

diff --git a/py/modules/IcePy/Slice.cpp b/py/modules/IcePy/Slice.cpp
index 41daf98..ddeb3a4 100644
--- a/py/modules/IcePy/Slice.cpp
+++ b/py/modules/IcePy/Slice.cpp
@@ -71,6 +71,7 @@ IcePy_loadSlice(PyObject* /*self*/, PyObject* args)
     opts.addOpt("", "underscore");
     opts.addOpt("", "checksum");
     opts.addOpt("", "all");
+    opts.addOpt("", "plugin", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat);
 
     vector<string> files;
     try
@@ -129,6 +130,8 @@ IcePy_loadSlice(PyObject* /*self*/, PyObject* args)
     all = opts.isSet("all");
     checksum = opts.isSet("checksum");
 
+    vector<string> plugins = opts.argVec("plugin");
+
     bool ignoreRedefs = false;
     bool keepComments = true;
 
@@ -160,7 +163,7 @@ IcePy_loadSlice(PyObject* /*self*/, PyObject* args)
         ostringstream codeStream;
         IceUtilInternal::Output out(codeStream);
         out.setUseTab(false);
-        generate(u, all, checksum, includePaths, out, vector<string>());
+        generate(u, all, checksum, includePaths, out, plugins);
         u->destroy();
 
         string code = codeStream.str();

-----------------------------------------------------------------------


-- 
asterisk-scf/release/ice.git



More information about the asterisk-scf-commits mailing list