* python/lvalue_cast_post_process.py - removed. Patch has been
authorJohn (J5) Palmieri <johnp@redhat.com>
Tue, 29 Mar 2005 17:01:43 +0000 (17:01 +0000)
committerJohn (J5) Palmieri <johnp@redhat.com>
Tue, 29 Mar 2005 17:01:43 +0000 (17:01 +0000)
  submitted to Pyrex maintainers that fixes gcc4.0 error

* python/Makefile.am: removed refrences to lvalue_cast_post_process.py

ChangeLog
python/Makefile.am
python/lvalue_cast_post_process.py [deleted file]

index 80f8ade..9afd23d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-03-29  John (J5) Palmieri  <johnp@redhat.com>
+
+       * python/lvalue_cast_post_process.py - removed.  Patch has been
+         submitted to Pyrex maintainers that fixes gcc4.0 errors
+
+       * python/Makefile.am: removed refrences to lvalue_cast_post_process.py
+
 2005-03-24  Daniel Reed  <n@ml.org>
 
        * tools/Makefile.am: Make print-introspect and
index 3fd678b..2519163 100644 (file)
@@ -16,8 +16,7 @@ nodist_dbus_bindings_la_SOURCES = dbus_bindings.c
 EXTRA_DIST =                   \
        dbus_h_wrapper.h        \
        dbus_bindings.pyx.in    \
-       extract.py              \
-       lvalue_cast_post_process.py     
+       extract.py
 
 CLEANFILES =                   \
        dbus_bindings.pyx       \
@@ -27,7 +26,5 @@ CLEANFILES =                  \
 dbus_bindings.pyx: dbus_bindings.pyx.in extract.py
        -$(PYTHON) extract.py dbus_bindings.pyx.in -I$(top_builddir)  > dbus_bindings.pyx
 
-dbus_bindings.c: dbus_bindings.pyx lvalue_cast_post_process.py
+dbus_bindings.c: dbus_bindings.pyx
        -pyrexc dbus_bindings.pyx
-       -$(PYTHON) lvalue_cast_post_process.py dbus_bindings.c
-       -mv dbus_bindings.c.gcc4fix dbus_bindings.c
diff --git a/python/lvalue_cast_post_process.py b/python/lvalue_cast_post_process.py
deleted file mode 100755 (executable)
index 6612900..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/env python
-
-import re
-import sys
-
-exp_pattern = re.compile('(.*)=(.*);')
-lval_pyobject_pattern = re.compile('\s*\(\((PyObject[ ]?\*)\)([A-Za-z0-9_ ]+)\)')
-lval_structcast_pattern = re.compile('\s*\((struct [A-Za-z0-9_]+ \*)\)([A-Za-z0-9_]+)\-\>([A-Za-z0-9_]+)')
-
-def parse_expression(exp):
-       exp_match = exp_pattern.match(exp)
-       if exp_match:
-               lvalue = exp_match.group(1)
-               rvalue = exp_match.group(2)
-
-               lval_match = lval_pyobject_pattern.match(lvalue)
-
-               if lval_match:
-                       cast = lval_match.group(1)
-                       lvar = lval_match.group(2)
-
-                       return "%s = (%s)(%s);" % (lvar, cast, rvalue)
-               else:
-                       lval_match = lval_structcast_pattern.match(lvalue)
-                       if lval_match:
-                               cast = lval_match.group(1)
-                               casted_var = lval_match.group(2)
-                               member_var = lval_match.group(3)
-
-                               result = "%s->%s = ((%s)%s);" % (
-                                           casted_var, 
-                                           member_var, 
-                                           cast,
-                                           rvalue)
-
-                               return result
-
-       return None
-
-def main():
-       if len(sys.argv) != 2:
-               print "USAGE: " + sys.argv[0] + " <file name>" 
-               return(-1)      
-
-       file = sys.argv[1]
-       f = open(file)
-       gcc4fix_filename = file + ".gcc4fix"
-       outputf = open(gcc4fix_filename, 'w')
-
-       lines = f.readlines()
-       f.close()
-       for line in lines:
-               c = line.count(";")
-               if c == 0:
-                       outputf.write(line)
-                       continue
-
-               exprs = line.split(';')
-               line = ""
-               last = exprs.pop()
-               for expr in exprs:
-                       expr = expr + ";"
-
-                       result = parse_expression(expr)
-                       if result:
-                               line = line + result
-                       else:
-                               line = line + expr
-
-               if (last.strip()!=''):
-                       line = line + last
-               else:
-                       line = line + "\n"
-                       
-               outputf.write(line)
-       
-       outputf.close()
-
-if __name__ == "__main__":
-       sys.exit(main())