\n cause error.

[email protected] (Xiao Yafeng)
Newsgroups perl.inline
Message-ID <CABPUXgCNgpr3KeZwiJo0vsMOJFv=j-Q5S-is=WE47Dqe4DUGAw@mail.gmail.com>
Hi all,

I've found a bug(maybe) in Inline C while dig wchar_t. see
http://www.perlmonks.org/?node_id=981427

I made a small inline c snippet as rob's suggestion, but throw an error:
....
l\lib\CORE"   test_list_pl_f553.c
test_list_pl_f553.xs: In function `GetProcessList':
test_list_pl_f553.xs:29: error: missing terminating " character
test_list_pl_f553.xs:30: error: missing terminating " character
test_list_pl_f553.xs:35: error: syntax error before '}' token
dmake.exe:  Error code 129, while making 'test_list_pl_f553.o'


I've found this error is because inline can't treat \n in printf statement
correctly, In xs file,
printf("blah blah blah %s \n", sz) will be translated into

printf("blah blah blah %s
", sz)                           #two lines!!


a bug?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.