aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/cbrt_tablegen.c
diff options
context:
space:
mode:
authorDiego Pettenò <flameeyes@gmail.com>2010-06-27 12:21:12 +0000
committerDiego Pettenò <flameeyes@gmail.com>2010-06-27 12:21:12 +0000
commit350120d269033f4cc206850b3c81f797ed2cb9c6 (patch)
treef6c92e9142bea1123d8154f75c3f8b17967220ae /libavcodec/cbrt_tablegen.c
parentac014798ff719c69a895aff0189a794ed9046554 (diff)
downloadffmpeg-350120d269033f4cc206850b3c81f797ed2cb9c6.tar.gz
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. Originally committed as revision 23821 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/cbrt_tablegen.c')
-rw-r--r--libavcodec/cbrt_tablegen.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/cbrt_tablegen.c b/libavcodec/cbrt_tablegen.c
index 5cbceb247c..e0a8e63a8b 100644
--- a/libavcodec/cbrt_tablegen.c
+++ b/libavcodec/cbrt_tablegen.c
@@ -31,9 +31,7 @@ int main(void)
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;
}