diff cbrt_tablegen.c @ 11980:263b4ef7ad87 libavcodec

tablegen: implement and use WRITE_ARRAY macros Two macros (WRITE_ARRAY and WRITE_ARRAY_2D) take the prefix (modifiers) (not all tables are static, and they might not be constant either), the type, and the name of the array. It'll be copied with same name and type, and with the correct size of the currently-defined object.
author flameeyes
date Sun, 27 Jun 2010 12:21:12 +0000
parents 59f399926c12
children
line wrap: on
line diff
--- a/cbrt_tablegen.c	Sun Jun 27 12:20:39 2010 +0000
+++ b/cbrt_tablegen.c	Sun Jun 27 12:21:12 2010 +0000
@@ -31,9 +31,7 @@
 
     write_fileheader();
 
-    printf("static const uint32_t cbrt_tab[1<<13] = {\n");
-    write_uint32_t_array(cbrt_tab, 1 << 13);
-    printf("};\n");
+    WRITE_ARRAY("static const", uint32_t, cbrt_tab);
 
     return 0;
 }