Skip to content

Commit

Permalink
Merge pull request #40 from rdeterre/python-3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
smihica authored Dec 20, 2021
2 parents 541f73f + 3ef55e3 commit cd7acde
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def read(fname):

setup(
name = 'pyminizip',
version = '0.2.5',
version = '0.2.6',
description = 'A minizip wrapper - To create a password encrypted zip file in python.',
author='Shin Aoyama',
author_email = "[email protected]",
Expand Down
4 changes: 3 additions & 1 deletion src/py_miniunz.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
*/

#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "bytesobject.h"

Expand Down Expand Up @@ -417,7 +418,8 @@ int _uncompress(const char* src, const char* password, const char *dirname,

PyObject *py_uncompress(PyObject *self, PyObject *args)
{
int src_len, pass_len, dir_len, withoutpath, res;
Py_ssize_t src_len, pass_len, dir_len;
int withoutpath, res;
const char * src;
const char * pass;
const char * dir;
Expand Down
7 changes: 5 additions & 2 deletions src/py_minizip.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
*/

#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "bytesobject.h"

Expand Down Expand Up @@ -434,7 +435,8 @@ int _compress(const char** srcs, int src_num, const char** srcspath, int srcpath

static PyObject *py_compress(PyObject *self, PyObject *args)
{
int src_len, srcpath_len, dst_len, pass_len, level, res;
Py_ssize_t src_len, srcpath_len, dst_len, pass_len;
int level, res;
const char * src;
const char * srcpath;
const char * dst;
Expand Down Expand Up @@ -481,7 +483,8 @@ static PyObject *py_compress(PyObject *self, PyObject *args)
static PyObject *py_compress_multiple(PyObject *self, PyObject *args)
{
int i;
int src_len, srcpath_len, dst_len, pass_len, level, res;
int src_len, srcpath_len, level, res;
Py_ssize_t dst_len, pass_len;
PyObject * src, * srcpath;
char ** srcs, ** srcspath = NULL;
const char * dst;
Expand Down

0 comments on commit cd7acde

Please sign in to comment.