becopyheur2: Remove unnecessary indirection.
[libfirm] / include / libfirm / adt / array.h
index 0ec9341..5fc02d6 100644 (file)
@@ -1,20 +1,6 @@
 /*
- * Copyright (C) 1995-2011 University of Karlsruhe.  All right reserved.
- *
  * This file is part of libFirm.
- *
- * This file may be distributed and/or modified under the terms of the
- * GNU General Public License version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * Licensees holding valid libFirm Professional Edition licenses may use
- * this file in accordance with the libFirm Commercial License.
- * Agreement provided with the Software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.
+ * Copyright (C) 2012 University of Karlsruhe.
  */
 
 /**
 #define NEW_ARR_F(type, nelts) \
   ((type *)ir_new_arr_f((nelts), sizeof(type) * (nelts)))
 
+/**
+ * Create a flexible array and null its contents.
+ */
+#define NEW_ARR_FZ(type, nelts) \
+       ((type*)memset(NEW_ARR_F(type, (nelts)), 0, sizeof(type) * (nelts)))
+
 /**
  * Creates a new flexible array with the same number of elements as a
  * given one.