Hello,
My name is Dale Hirt, and I'm working on some Python bindings for
Subversion(http://subversion.tigris.org). I am using your windows
distribution zip files for both 1.3.17 and 1.3.18. I have run across a bug
in 1.3.18 that I would like to let you know about. The following compiles
just fine under 1.3.17.
part of util.i applicable. Used both by 1.3.17, and 1.3.18:
%typemap(python, in) (char *buffer, apr_size_t *len) ($*2_type temp) {
if (!PyInt_Check($input)) {
PyErr_SetString(PyExc_TypeError,
"expecting an integer for the buffer size");
return NULL;
}
temp = PyInt_AsLong($input);
if (temp < 0) {
PyErr_SetString(PyExc_ValueError,
"buffer size must be a positive integer");
return NULL;
}
$1 = malloc(temp);
$2 = ($2_ltype)&temp;
}
And when run through SWIG, I get the following:
util.c:
{
if (!PyInt_Check(obj1)) {
PyErr_SetString(PyExc_TypeError,
"expecting an integer for the buffer size");
return NULL;
}
temp2 = PyInt_AsLong(obj1);
if (temp2 < 0) {
PyErr_SetString(PyExc_ValueError,
"buffer size must be a positive integer");
return NULL;
}
arg2 = malloc(temp2);
1.3.17 >> arg3 = (apr_size_t *)&temp2;
1.3.18 >> arg3 = (apr_size_t *)&temp;
}
And Compiling output (MSVC 6.0, Win2k):
Compiling...
util.c
D:\work\subversion\subversion\bindings\swig\python\win32\util.c(2981) :
error C2065: 'temp' : undeclared identifier
It would appear that it does not recognize &temp in order to replace it with
&temp2.
If I can be of any further assistance, please let me know.
Dale Hirt
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Mar 25 20:42:27 2003