mirror of
https://github.com/znc/znc.git
synced 2026-07-04 08:51:14 +02:00
Fix PY_SSIZE_T_CLEAN python warning
This commit is contained in:
+1
-1
@@ -135,7 +135,7 @@ script:
|
||||
- env LLVM_PROFILE_FILE="$PWD/unittest.profraw" make VERBOSE=1 unittest
|
||||
- sudo make install
|
||||
# TODO: use DEVEL_COVER_OPTIONS for https://metacpan.org/pod/Devel::Cover
|
||||
- env LLVM_PROFILE_FILE="$PWD/inttest.profraw" ZNC_MODPERL_COVERAGE_OPTS="-db,$PWD/cover_db" make VERBOSE=1 inttest
|
||||
- env LLVM_PROFILE_FILE="$PWD/inttest.profraw" ZNC_MODPERL_COVERAGE_OPTS="-db,$PWD/cover_db" PYTHONWARNINGS=error make VERBOSE=1 inttest
|
||||
- /usr/local/bin/znc --version
|
||||
after_success:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ~/perl5/bin/cover --no-gcov --report=clover; fi
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
|
||||
#include <znc/Chan.h>
|
||||
@@ -455,7 +456,7 @@ CBSOCK(ConnectionRefused);
|
||||
void CPySocket::ReadData(const char* data, size_t len) {
|
||||
PyObject* pyRes =
|
||||
PyObject_CallMethod(m_pyObj, const_cast<char*>("OnReadData"),
|
||||
const_cast<char*>("y#"), data, (int)len);
|
||||
const_cast<char*>("y#"), data, (Py_ssize_t)len);
|
||||
CHECKCLEARSOCK("OnReadData");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user