lucene-pylucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject svn commit: r1787819 - in /lucene/pylucene/trunk/jcc/jcc3: cpp.py python.py sources/jcc.cpp
Date Mon, 20 Mar 2017 17:39:48 GMT
Author: vajda
Date: Mon Mar 20 17:39:48 2017
New Revision: 1787819

URL: http://svn.apache.org/viewvc?rev=1787819&view=rev
Log:
  - fixed crasher bug in strhash (RĂ¼diger Meier)
  - fixed late night oops in python.py

Modified:
    lucene/pylucene/trunk/jcc/jcc3/cpp.py
    lucene/pylucene/trunk/jcc/jcc3/python.py
    lucene/pylucene/trunk/jcc/jcc3/sources/jcc.cpp

Modified: lucene/pylucene/trunk/jcc/jcc3/cpp.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc3/cpp.py?rev=1787819&r1=1787818&r2=1787819&view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc3/cpp.py (original)
+++ lucene/pylucene/trunk/jcc/jcc3/cpp.py Mon Mar 20 17:39:48 2017
@@ -889,7 +889,7 @@ def header(env, out, cls, typeset, packa
     else:
         line(out, indent, 'class %s%s : public %s {',
              _dll_export, cppname(names[-1]), absname(cppnames(superNames)))
-        
+
     line(out, indent, 'public:')
     indent += 1
 

Modified: lucene/pylucene/trunk/jcc/jcc3/python.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc3/python.py?rev=1787819&r1=1787818&r2=1787819&view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc3/python.py (original)
+++ lucene/pylucene/trunk/jcc/jcc3/python.py Mon Mar 20 17:39:48 2017
@@ -1838,7 +1838,7 @@ def compile(env, jccPath, output, module
                 args['extra_link_args'] += ['-Wl,-rpath', shlibdir]
             args['library_dirs'] = [shlibdir]
             args['libraries'] = ['jcc3']
-        elif sys.platform == 'linux'   # distutils no good with -R
+        elif sys.platform == 'linux':  # distutils no good with -R
             args['extra_link_args'] += ['-Wl,-rpath', shlibdir]
             args['library_dirs'] = [shlibdir]
             args['libraries'] = ['jcc3']

Modified: lucene/pylucene/trunk/jcc/jcc3/sources/jcc.cpp
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc3/sources/jcc.cpp?rev=1787819&r1=1787818&r2=1787819&view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc3/sources/jcc.cpp (original)
+++ lucene/pylucene/trunk/jcc/jcc3/sources/jcc.cpp Mon Mar 20 17:39:48 2017
@@ -15,6 +15,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <inttypes.h>
 #include <jni.h>
 
 #ifdef linux
@@ -194,11 +195,11 @@ static PyObject *t_jccenv_isShared(PyObj
 
 static PyObject *t_jccenv_strhash(PyObject *self, PyObject *arg)
 {
-    Py_hash_t hash = PyObject_Hash(arg);
-    size_t hexdig = sizeof(Py_hash_t) * 2;
+    static const size_t hexdig = sizeof(uintmax_t) * 2;
+    uintmax_t hash = (uintmax_t) PyObject_Hash(arg);
     char buffer[hexdig + 1];
 
-    sprintf(buffer, "%0*lx", (int) hexdig, (unsigned long) hash);
+    sprintf(buffer, "%0*"PRIxMAX, (int) hexdig, hash);
     return PyUnicode_FromStringAndSize(buffer, hexdig);
 }
 



Mime
View raw message