Return-Path: X-Original-To: apmail-lucene-pylucene-commits-archive@minotaur.apache.org Delivered-To: apmail-lucene-pylucene-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C0EEBE221 for ; Fri, 14 Dec 2012 03:30:36 +0000 (UTC) Received: (qmail 38257 invoked by uid 500); 14 Dec 2012 03:30:36 -0000 Delivered-To: apmail-lucene-pylucene-commits-archive@lucene.apache.org Received: (qmail 38133 invoked by uid 500); 14 Dec 2012 03:30:31 -0000 Mailing-List: contact pylucene-commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: pylucene-dev@lucene.apache.org Delivered-To: mailing list pylucene-commits@lucene.apache.org Received: (qmail 37905 invoked by uid 99); 14 Dec 2012 03:30:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Dec 2012 03:30:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Dec 2012 03:30:24 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 38D49238896F; Fri, 14 Dec 2012 03:30:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1421652 - in /lucene/pylucene/trunk/jcc: CHANGES jcc/cpp.py Date: Fri, 14 Dec 2012 03:30:01 -0000 To: pylucene-commits@lucene.apache.org From: vajda@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121214033003.38D49238896F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: vajda Date: Fri Dec 14 03:29:58 2012 New Revision: 1421652 URL: http://svn.apache.org/viewvc?rev=1421652&view=rev Log: - added support for wrapping non-public methods by listing them as class:method Modified: lucene/pylucene/trunk/jcc/CHANGES 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=1421652&r1=1421651&r2=1421652&view=diff ============================================================================== --- lucene/pylucene/trunk/jcc/CHANGES (original) +++ lucene/pylucene/trunk/jcc/CHANGES Fri Dec 14 03:29:58 2012 @@ -2,6 +2,7 @@ Version 2.14 -> -------------------- - improved JCC build on Linux by mokey patching setuptools (Caleb Burns) - fixed bug with wrapping arrays coming out of generic iterators + - added support for wrapping non-public methods by listing them as class:method - Version 2.13 -> 2.14 Modified: lucene/pylucene/trunk/jcc/jcc/cpp.py URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/cpp.py?rev=1421652&r1=1421651&r2=1421652&view=diff ============================================================================== --- lucene/pylucene/trunk/jcc/jcc/cpp.py (original) +++ lucene/pylucene/trunk/jcc/jcc/cpp.py Fri Dec 14 03:29:58 2012 @@ -343,6 +343,7 @@ def jcc(args): classNames = set() listedClassNames = set() + listedMethodNames = {} packages = set() jars = [] classpath = [_jcc.CLASSPATH] @@ -504,6 +505,9 @@ def jcc(args): else: raise ValueError, "Invalid argument: %s" %(arg) else: + if ':' in arg: + arg, method = arg.split(':', 1) + listedMethodNames.setdefault(arg, set()).add(method) classNames.add(arg) listedClassNames.add(arg) i += 1 @@ -634,7 +638,8 @@ def jcc(args): (superCls, constructors, methods, protectedMethods, methodNames, fields, instanceFields, declares) = \ header(env, out_h, cls, typeset, packages, excludes, - generics, _dll_export) + generics, listedMethodNames.get(cls.getName(), ()), + _dll_export) if not allInOne: out_cpp = file(fileName + '.cpp', 'w') @@ -693,7 +698,8 @@ def jcc(args): extra_setup_args) -def header(env, out, cls, typeset, packages, excludes, generics, _dll_export): +def header(env, out, cls, typeset, packages, excludes, generics, + listedMethodNames, _dll_export): names = cls.getName().split('.') superCls = cls.getSuperclass() @@ -771,7 +777,8 @@ def header(env, out, cls, typeset, packa protectedMethods = [] for method in cls.getDeclaredMethods(): modifiers = method.getModifiers() - if Modifier.isPublic(modifiers): + if (Modifier.isPublic(modifiers) or + method.getName() in listedMethodNames): if generics: returnType = method.getGenericReturnType() else: