Merge branch 'st/python'
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 8 Dec 2009 12:28:10 +0000 (13:28 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 8 Dec 2009 12:28:10 +0000 (13:28 +0100)
configure.in
src/pyvalues.c

index 232d455..ea1e40e 100644 (file)
@@ -2698,12 +2698,12 @@ PATH="$SAVE_PATH"
 if test "x$with_python" = "xyes"
 then
        AC_MSG_CHECKING([for Python CPPFLAGS])
-       python_include_path=`echo "import distutils.sysconfig;print distutils.sysconfig.get_python_inc()" | "$with_python_prog" 2>/dev/null`
+       python_include_path=`echo "import distutils.sysconfig;print distutils.sysconfig.get_python_inc()" | "$with_python_prog" 2>&1`
        python_config_status=$?
 
        if test "$python_config_status" -ne 0 || test "x$python_include_path" = "x"
        then
-               AC_MSG_RESULT([failed with status $python_config_status])
+               AC_MSG_RESULT([failed with status $python_config_status (output: $python_include_path)])
                with_python="no"
        else
                AC_MSG_RESULT([$python_include_path])
@@ -2718,7 +2718,7 @@ then
 
        if test "$python_config_status" -ne 0 || test "x$python_library_path" = "x"
        then
-               AC_MSG_RESULT([failed with status $python_config_status])
+               AC_MSG_RESULT([failed with status $python_config_status (output: $python_library_path)])
                with_python="no"
        else
                AC_MSG_RESULT([$python_library_path])
@@ -2733,7 +2733,7 @@ then
 
        if test "$python_config_status" -ne 0 || test "x$python_library_flags" = "x"
        then
-               AC_MSG_RESULT([failed with status $python_config_status])
+               AC_MSG_RESULT([failed with status $python_config_status (output: $python_library_flags)])
                with_python="no"
        else
                AC_MSG_RESULT([$python_library_flags])
index da7c21d..e25353e 100644 (file)
@@ -274,7 +274,7 @@ static int Values_init(PyObject *s, PyObject *args, PyObject *kwds) {
 static PyObject *Values_dispatch(Values *self, PyObject *args, PyObject *kwds) {
        int i, ret;
        const data_set_t *ds;
-       Py_ssize_t size;
+       int size;
        value_t *value;
        value_list_t value_list = VALUE_LIST_INIT;
        PyObject *values = self->values;
@@ -306,9 +306,9 @@ static PyObject *Values_dispatch(Values *self, PyObject *args, PyObject *kwds) {
                PyErr_Format(PyExc_TypeError, "values must be list or tuple");
                return NULL;
        }
-       size = PySequence_Length(values);
+       size = (int) PySequence_Length(values);
        if (size != ds->ds_num) {
-               PyErr_Format(PyExc_RuntimeError, "type %s needs %d values, got %zd", type, ds->ds_num, size);
+               PyErr_Format(PyExc_RuntimeError, "type %s needs %d values, got %i", type, ds->ds_num, size);
                return NULL;
        }
        value = malloc(size * sizeof(*value));
@@ -373,7 +373,7 @@ static PyObject *Values_dispatch(Values *self, PyObject *args, PyObject *kwds) {
 static PyObject *Values_write(Values *self, PyObject *args, PyObject *kwds) {
        int i, ret;
        const data_set_t *ds;
-       Py_ssize_t size;
+       int size;
        value_t *value;
        value_list_t value_list = VALUE_LIST_INIT;
        PyObject *values = self->values;
@@ -406,9 +406,9 @@ static PyObject *Values_write(Values *self, PyObject *args, PyObject *kwds) {
                PyErr_Format(PyExc_TypeError, "values must be list or tuple");
                return NULL;
        }
-       size = PySequence_Length(values);
+       size = (int) PySequence_Length(values);
        if (size != ds->ds_num) {
-               PyErr_Format(PyExc_RuntimeError, "type %s needs %d values, got %zd", type, ds->ds_num, size);
+               PyErr_Format(PyExc_RuntimeError, "type %s needs %d values, got %i", type, ds->ds_num, size);
                return NULL;
        }
        value = malloc(size * sizeof(*value));