You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by va...@apache.org on 2009/08/20 19:44:15 UTC

svn commit: r806273 - in /lucene/pylucene/trunk/jcc: CHANGES jcc/__main__.py jcc/cpp.py

Author: vajda
Date: Thu Aug 20 17:44:14 2009
New Revision: 806273

URL: http://svn.apache.org/viewvc?rev=806273&view=rev
Log:
 - added --vmarg to add Java VM initialization parameters (Christian Kofler)

Modified:
    lucene/pylucene/trunk/jcc/CHANGES
    lucene/pylucene/trunk/jcc/jcc/__main__.py
    lucene/pylucene/trunk/jcc/jcc/cpp.py

Modified: lucene/pylucene/trunk/jcc/CHANGES
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/CHANGES?rev=806273&r1=806272&r2=806273&view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/CHANGES (original)
+++ lucene/pylucene/trunk/jcc/CHANGES Thu Aug 20 17:44:14 2009
@@ -6,6 +6,7 @@
  - fixed local string ref leaks in JArray<jstring>.get/toSequence (Aric Coady)
  - added --libpath parameter to specify -Djava.library.path
  - classes listed with --exclude are no longer loaded (except for dependencies)
+ - added --vmarg to add Java VM initialization parameters (Christian Kofler)
  - 
 
 Version 2.2 -> 2.3

Modified: lucene/pylucene/trunk/jcc/jcc/__main__.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/__main__.py?rev=806273&r1=806272&r2=806273&view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/__main__.py (original)
+++ lucene/pylucene/trunk/jcc/jcc/__main__.py Thu Aug 20 17:44:14 2009
@@ -19,11 +19,14 @@
                               which dependencies are automatically wrapped
     --classpath [PATH|JAR]  - add [PATH|JAR] to CLASSPATH while generating
                               wrappers 
+    --libpath [PATH]        - add [PATH] to java.library.path while generating
+                              wrappers 
     --module MODULE         - include Python MODULE in the distribution
     --reserved SYMBOL       - mark SYMBOL as a reserved word that will be
                               mangled in the generated C++ code to avoid
                               clashes with C/C++ reserved words or header
                               file definitions
+    --vmarg                 - add extra Java VM initialization parameter
 
   Python wrapper generation options:
     --python NAME           - generate wrappers for use from Python in a module

Modified: lucene/pylucene/trunk/jcc/jcc/cpp.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/cpp.py?rev=806273&r1=806272&r2=806273&view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/cpp.py (original)
+++ lucene/pylucene/trunk/jcc/jcc/cpp.py Thu Aug 20 17:44:14 2009
@@ -258,6 +258,7 @@
     jars = []
     classpath = []
     libpath = []
+    vmargs = ['-Djava.awt.headless=true']
     moduleName = None
     modules = []
     build = False
@@ -303,6 +304,9 @@
             elif arg == '--libpath':
                 i += 1
                 libpath.append(args[i])
+            elif arg == '--vmarg':
+                i += 1
+                vmargs.append(args[i])
             elif arg == '--python':
                 from python import python, module
                 i += 1
@@ -377,12 +381,11 @@
             classNames.add(arg)
         i += 1
 
-    vmargs = '-Djava.awt.headless=true'
     if libpath:
-        vmargs += ' -Djava.library.path=' + os.pathsep.join(libpath)
+        vmargs.append('-Djava.library.path=' + os.pathsep.join(libpath))
 
     env = initVM(os.pathsep.join(classpath) or None,
-                 maxstack='512k', vmargs=vmargs)
+                 maxstack='512k', vmargs=' '.join(vmargs))
 
     typeset = set()
     excludes = set(excludes)