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
This commit is contained in:
@@ -32,13 +32,8 @@ int main(void)
|
||||
|
||||
write_fileheader();
|
||||
|
||||
printf("static const uint8_t linear_to_alaw[1 << 14] = {\n");
|
||||
write_uint8_t_array(linear_to_alaw, 1 << 14);
|
||||
printf("};\n");
|
||||
|
||||
printf("static const uint8_t linear_to_ulaw[1 << 14] = {\n");
|
||||
write_uint8_t_array(linear_to_ulaw, 1 << 14);
|
||||
printf("};\n");
|
||||
WRITE_ARRAY("static const", uint8_t, linear_to_alaw);
|
||||
WRITE_ARRAY("static const", uint8_t, linear_to_ulaw);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user