How to statically bind modules written in Python

jepler epler jepler.lnk at lnk.ispi.net
Wed Oct 25 08:15:50 EDT 2000


On Wed, 18 Oct 2000 23:53:08 -0700, jay.krell at cornell.edu
 <jay.krell at cornell.edu> wrote:
>const char foo_py[] =
>"abc\n"
>"124\n"
>"this is supposed to be Python code\n"
>;

You'll find that many C compilers, including MSVC6, permit embarassingly
small string constants, even those produced by string (con)catenation.

const char foo_py[] = {
	'a', 'b', 'c', '\n', /* ... */
};

is much more likely to succeed on platforms which treat the C standard's
translations as maximums as well as minimums.

Speaking from experience,
Jeff



More information about the Python-list mailing list