Imported Upstream version 3.3.3
[debian/amanda] / perl / Amanda / Header.swg
index a7d391b630246cf6c0de37835f12729e2e3c1c57..81087dc762e64524241601044f5a23379907ed56 100644 (file)
@@ -1,9 +1,10 @@
 /*
- * Copyright (c) 2009, 2010 Zmanda, Inc.  All Rights Reserved.
+ * Copyright (c) 2009-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
- * by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -123,7 +124,6 @@ typedef struct {
     }
 } dumpfile_t;
 
-%newobject C_from_string;
 %inline %{
 static dumpfile_t *C_from_string(const char *string) {
     dumpfile_t *result = g_new(dumpfile_t, 1);
@@ -151,7 +151,11 @@ sub from_string {
 sub get_dle {
     my $self = shift;
 
-    return Amanda::Header::HeaderXML->new($self->{'dle_str'});
+    if ($self->{'dle_str'}) {
+       return Amanda::Header::HeaderXML->new($self->{'dle_str'});
+    } else {
+       return undef;
+    }
 }
 
 package Amanda::Header::Header;
@@ -192,10 +196,10 @@ typedef struct {
     int     record;
     int     create_index;
     char   *auth;
-    sl_t   *exclude_file;
-    sl_t   *exclude_list;
-    sl_t   *include_file;
-    sl_t   *include_list;
+    am_sl_t   *exclude_file;
+    am_sl_t   *exclude_list;
+    am_sl_t   *include_file;
+    am_sl_t   *include_list;
     int     exclude_optional;
     int     include_optional;
     proplist_t application_property;