X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=include%2Flibfirm%2Fadt%2Farray.h;h=5fc02d6e6c9aef795b8771d0682fd75e31e4cf4b;hb=e5c8ad12dba958fd212704917d7a433e6716462b;hp=0ec934168e4e8f49d826351e9ed328c6f30526ff;hpb=1209ae49db1b42e9d39269eb3a86b187f0c263d9;p=libfirm diff --git a/include/libfirm/adt/array.h b/include/libfirm/adt/array.h index 0ec934168..5fc02d6e6 100644 --- a/include/libfirm/adt/array.h +++ b/include/libfirm/adt/array.h @@ -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. */ /** @@ -53,6 +39,12 @@ #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.