diff --git a/ChangeLog b/ChangeLog index 2cf12ead19..e768857b67 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2004-05-03 Johan Dahlin + * configure.ac: define HAVE_OLD_PYGTK if we're on pygtk 2.3.91 or earlier. + + * gst/common.h: Add backwards compatible typedef for python < 2.3 + and pygtk < 2.3.92 + * codegen/codegen.py: Resync (add support for tp_as_buffer) * gst/gst.override: Support buffer interface for GstBuffer. Move diff --git a/configure.ac b/configure.ac index 36cc35487a..797e27afbd 100644 --- a/configure.ac +++ b/configure.ac @@ -60,6 +60,12 @@ dnl check for pygtk PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= $PYGTK_REQ) AC_SUBST(PYGTK_CFLAGS) +PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= 2.3.92, ,HAVE_OLD_PYGTK="yes") +AC_SUBST(PYGTK_CFLAGS) +if test "x$HAVE_OLD_PYGTK" = "xyes"; then + AC_DEFINE_UNQUOTED(HAVE_OLD_PYGTK, 1, [Defined if we have an old version of PyGTK]) +fi + AC_MSG_CHECKING(for pygtk defs) PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0` AC_SUBST(PYGTK_DEFSDIR) diff --git a/gst/common.h b/gst/common.h index 279113c648..28b552b9fc 100644 --- a/gst/common.h +++ b/gst/common.h @@ -26,6 +26,10 @@ #include "pygobject.h" +#if defined HAVE_OLD_PYGTK && PY_VERSION_HEX < 0x02030000 + typedef destructor freefunc; +#endif + typedef struct { PyGObject *pad; PyObject *link_function;