From 44c548b205b3a9d39788653bf479448ab5f1258d Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Mon, 21 Nov 2005 16:34:26 +0000 Subject: *.*: Ran scripts/update-macros. Oh yes. gst/gstobject.h (GST_OBJECT_GET_LOCK, GST_OBJECT_LOCK) Original commit message from CVS: 2005-11-21 Andy Wingo * *.h: * *.c: Ran scripts/update-macros. Oh yes. * gst/gstobject.h (GST_OBJECT_GET_LOCK, GST_OBJECT_LOCK) (GST_OBJECT_TRYLOCK, GST_OBJECT_UNLOCK): Renamed from GST_GET_LOCK, etc. * scripts/update-macros: New script. Run it on your files to change GST_LOCK to GST_OBJECT_LOCK, and the same for UNLOCK as well. --- scripts/update-macros | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 scripts/update-macros (limited to 'scripts') diff --git a/scripts/update-macros b/scripts/update-macros new file mode 100755 index 0000000000..3d365e51d5 --- /dev/null +++ b/scripts/update-macros @@ -0,0 +1,26 @@ +#!/bin/bash + +set -e + +if test -z "$1" -o -n "$2"; then + echo "Usage: $0 FILE" >&2 + exit 1 +fi + +file=$1 + +if grep -q GST_GET_LOCK $file; then + echo "$file: GST_GET_LOCK->GST_OBJECT_GET_LOCK" + perl -i -p -e 's/GST_GET_LOCK/GST_OBJECT_GET_LOCK/g' $file +fi + +if egrep -q 'GST_LOCK' $file; then + echo "$file: GST_LOCK->GST_OBJECT_LOCK" + perl -i -p -e 's/GST_LOCK/GST_OBJECT_LOCK/g' $file +fi + +if egrep -q 'GST_UNLOCK' $file; then + echo "$file: GST_UNLOCK->GST_OBJECT_UNLOCK" + perl -i -p -e 's/GST_UNLOCK/GST_OBJECT_UNLOCK/g' $file +fi + -- cgit v1.2.1