lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


pan shizhu <pan.shizhu@gmail.com> wrote:
> xxd -i output a char array like the following, which is not a string
> literal.
>
> unsigned char ltools_lua[] = {
>   0x0a, 0x6c, 0x6f, 0x63, 0x61,
> };

That's similar to what Dave was pointing out earlier:

   const char* s = "foo...bar";  /* string literal; limited to 4096 */
   const char s[] = "foo...bar"; /* initializer, NOT a string literal */

The latter is equivalent to:

   const char s[] = { 'f', 'o', 'o', ... 'b', 'a', 'r' };