--- src/agg.cxx.orig 2006-08-30 21:04:54.000000000 -0600 +++ src/agg.cxx 2006-08-30 21:05:56.000000000 -0600 @@ -1228,7 +1228,7 @@ obj = pyobj; if (PyCFunction_Check(obj)) { /* here we get the method pointer for callbacks */ - char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); + const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); c = doc ? strstr(doc, "swig_ptr: ") : 0; if (c) { c = ty ? SWIG_UnpackVoidPtr(c + 10, &vptr, ty->name) : 0; @@ -27621,11 +27621,11 @@ swig_type_info **types_initial) { size_t i; for (i = 0; methods[i].ml_name; ++i) { - char *c = methods[i].ml_doc; + const char *c = methods[i].ml_doc; if (c && (c = strstr(c, "swig_ptr: "))) { int j; swig_const_info *ci = 0; - char *name = c + 10; + const char *name = c + 10; for (j = 0; const_table[j].type; ++j) { if (strncmp(const_table[j].name, name, strlen(const_table[j].name)) == 0) { --- CXX/cxx_extensions.cxx 2005-09-22 08:32:51.000000000 -0600 +++ /Users/bwaters/_today/cxx_extensions.cxx 2006-08-30 20:58:14.000000000 -0600 @@ -149,15 +149,15 @@ static PyObject* iternext_handler (PyObject*); // Sequence methods - static int sequence_length_handler(PyObject*); + static Py_ssize_t sequence_length_handler(PyObject*); static PyObject* sequence_concat_handler(PyObject*,PyObject*); - static PyObject* sequence_repeat_handler(PyObject*, int); - static PyObject* sequence_item_handler(PyObject*, int); - static PyObject* sequence_slice_handler(PyObject*, int, int); - static int sequence_ass_item_handler(PyObject*, int, PyObject*); - static int sequence_ass_slice_handler(PyObject*, int, int, PyObject*); + static PyObject* sequence_repeat_handler(PyObject*, Py_ssize_t); + static PyObject* sequence_item_handler(PyObject*, Py_ssize_t); + static PyObject* sequence_slice_handler(PyObject*, Py_ssize_t, Py_ssize_t); + static int sequence_ass_item_handler(PyObject*, Py_ssize_t, PyObject*); + static int sequence_ass_slice_handler(PyObject*, Py_ssize_t, Py_ssize_t, PyObject*); // Mapping - static int mapping_length_handler(PyObject*); + static Py_ssize_t mapping_length_handler(PyObject*); static PyObject* mapping_subscript_handler(PyObject*, PyObject*); static int mapping_ass_subscript_handler(PyObject*, PyObject*, PyObject*); @@ -186,9 +186,9 @@ static PyObject* number_power_handler(PyObject*, PyObject*, PyObject*); // Buffer - static int buffer_getreadbuffer_handler (PyObject*, int, void**); - static int buffer_getwritebuffer_handler (PyObject*, int, void**); - static int buffer_getsegcount_handler (PyObject*, int*); + static Py_ssize_t buffer_getreadbuffer_handler (PyObject*, Py_ssize_t, void**); + static Py_ssize_t buffer_getwritebuffer_handler (PyObject*, Py_ssize_t, void**); + static Py_ssize_t buffer_getsegcount_handler (PyObject*, int*); }; @@ -270,7 +270,7 @@ table->tp_as_buffer = buffer_table; buffer_table->bf_getreadbuffer = buffer_getreadbuffer_handler; buffer_table->bf_getwritebuffer = buffer_getwritebuffer_handler; - buffer_table->bf_getsegcount = buffer_getsegcount_handler; + buffer_table->bf_getsegcount = (segcountproc) buffer_getsegcount_handler; } } @@ -599,7 +599,7 @@ // Sequence methods -extern "C" int sequence_length_handler( PyObject *self ) +extern "C" Py_ssize_t sequence_length_handler( PyObject *self ) { try { @@ -625,7 +625,7 @@ } } -extern "C" PyObject* sequence_repeat_handler( PyObject *self, int count ) +extern "C" PyObject* sequence_repeat_handler( PyObject *self, Py_ssize_t count ) { try { @@ -638,7 +638,7 @@ } } -extern "C" PyObject* sequence_item_handler( PyObject *self, int index ) +extern "C" PyObject* sequence_item_handler( PyObject *self, Py_ssize_t index ) { try { @@ -651,7 +651,7 @@ } } -extern "C" PyObject* sequence_slice_handler( PyObject *self, int first, int last ) +extern "C" PyObject* sequence_slice_handler( PyObject *self, Py_ssize_t first, Py_ssize_t last ) { try { @@ -664,7 +664,7 @@ } } -extern "C" int sequence_ass_item_handler( PyObject *self, int index, PyObject *value ) +extern "C" int sequence_ass_item_handler( PyObject *self, Py_ssize_t index, PyObject *value ) { try { @@ -677,7 +677,7 @@ } } -extern "C" int sequence_ass_slice_handler( PyObject *self, int first, int last, PyObject *value ) +extern "C" int sequence_ass_slice_handler( PyObject *self, Py_ssize_t first, Py_ssize_t last, PyObject *value ) { try { @@ -691,7 +691,7 @@ } // Mapping -extern "C" int mapping_length_handler( PyObject *self ) +extern "C" Py_ssize_t mapping_length_handler( PyObject *self ) { try { @@ -1018,7 +1018,7 @@ } // Buffer -extern "C" int buffer_getreadbuffer_handler( PyObject *self, int index, void **pp ) +extern "C" Py_ssize_t buffer_getreadbuffer_handler( PyObject *self, Py_ssize_t index, void **pp ) { try { @@ -1031,7 +1031,7 @@ } } -extern "C" int buffer_getwritebuffer_handler( PyObject *self, int index, void **pp ) +extern "C" Py_ssize_t buffer_getwritebuffer_handler( PyObject *self, Py_ssize_t index, void **pp ) { try { @@ -1044,7 +1044,7 @@ } } -extern "C" int buffer_getsegcount_handler( PyObject *self, int *count ) +extern "C" Py_ssize_t buffer_getsegcount_handler( PyObject *self, int *count ) { try { --- src/_image.cpp 2006-05-29 17:18:13.000000000 -0600 +++ /Users/bwaters/_today/_image.cpp 2006-08-30 21:01:53.000000000 -0600 @@ -1258,7 +1258,7 @@ imo->colsIn = x; size_t NUMBYTES(imo->colsIn * imo->rowsIn * imo->BPP); - int buflen; + Py_ssize_t buflen; const agg::int8u *rawbuf; if (PyObject_AsReadBuffer(bufin, reinterpret_cast(&rawbuf), &buflen) != 0) throw Py::ValueError("Cannot get buffer from object."); --- src/swig_runtime.h 2005-11-16 10:18:44.000000000 -0700 +++ /Users/bwaters/_today/swig_runtime.h 2006-08-30 21:14:40.000000000 -0600 @@ -1137,7 +1137,7 @@ obj = pyobj; if (PyCFunction_Check(obj)) { /* here we get the method pointer for callbacks */ - char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); + const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); c = doc ? strstr(doc, "swig_ptr: ") : 0; if (c) { c = ty ? SWIG_UnpackVoidPtr(c + 10, &vptr, ty->name) : 0;