Skip to content

Commit

Permalink
Modification pour que ça compile sous Python 2.5.
Browse files Browse the repository at this point in the history
  • Loading branch information
nlehuen committed Oct 6, 2006
1 parent 1a1493e commit b092e10
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion python/build.bat
@@ -1,7 +1,7 @@
rmdir /s /q build include
mkdir include & xcopy ..\include include
copy ..\include\LICENSE .
swig -O -Iinclude -DSCANNER -c++ -python tst.i
rem swig -O -Iinclude -DSCANNER -c++ -python tst.i
del MANIFEST
python setup.py clean sdist bdist_wininst
rmdir /s /q build include
8 changes: 3 additions & 5 deletions python/compacttst.py
Expand Up @@ -87,12 +87,10 @@ def __getitem__(self,string):
# il n'y a donc pas de match possible (sinon il y aurait eu
# split à l'insertion)
return None
else:
# différence au dernier caractère du noeud
if diff>0:
elif diff>0:
node = node.left
elif diff<0:
node = node.right
else: # diff<0
node = node.right

elif local_index == len(node.chars):
# On est au bout des caractères du noeud
Expand Down
6 changes: 3 additions & 3 deletions python/tst_wrap.cxx
Expand Up @@ -2048,7 +2048,7 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
void *vptr = 0;

/* 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);
const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
if (desc) {
desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
Expand Down Expand Up @@ -6755,11 +6755,11 @@ extern "C" {
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) {
Expand Down

0 comments on commit b092e10

Please sign in to comment.