X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=perl%2FAmanda%2FUtil.swg;fp=perl%2FAmanda%2FUtil.swg;h=43c4a99fc7cdf6e7360d3e24ffdc05512e15b2f4;hb=949b8910a5e23c4285d0b1aedacfc82a14dc97a5;hp=e325a9e0a918bad8ac0e5ed4bb549f55dc52d3f4;hpb=c6f0a88c567f8536c498f554285aed1f8150da18;p=debian%2Famanda diff --git a/perl/Amanda/Util.swg b/perl/Amanda/Util.swg index e325a9e..43c4a99 100644 --- a/perl/Amanda/Util.swg +++ b/perl/Amanda/Util.swg @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2008, 2009, 2010 Zmanda, Inc. All Rights Reserved. + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published @@ -315,8 +315,10 @@ sub safe_overwrite_file { for (iter = $1; *iter; iter++) { $result = sv_2mortal(newSVpv(*iter, 0)); + g_free(*iter); argvi++; } + g_free($1); } } @@ -338,12 +340,16 @@ char *perl_hexdecode_string(const char *str) { %} amglue_export_tag(encoding, hexencode hexdecode); +%newobject sanitise_filename; char *sanitise_filename(char *inp); +%newobject quote_string; char *quote_string(char *); +%newobject unquote_string; char *unquote_string(char *); GPtrArray *expand_braced_alternates(char *); %newobject collapse_braced_alternates; char *collapse_braced_alternates(GPtrArray *source); +%newobject split_quoted_strings; gchar **split_quoted_strings(const gchar *string); amglue_export_tag(quoting, quote_string unquote_string skip_quoted_string sanitise_filename split_quoted_strings split_quoted_strings_friendly); @@ -443,6 +449,7 @@ set_blocking(int fd, gboolean blocking) typedef struct file_lock { %extend { + %newobject file_lock; file_lock(const char *filename) { return file_lock_new(filename); }