[pypy-dev] MSVC "too many initializer" problem

Scott Dial scott+pypy-dev at scottdial.com
Sat Jul 29 06:48:46 CEST 2006


Right now, if I were to enter the translatorshell and try to compile any 
of the snippets I will get an the following error:

testing_1.c(2318) : warning C4047: 'initializing' : 'char *' differs in 
levels of indirection from 'int'
testing_1.c(2318) : error C2078: too many initializers

Which refers to this line (for this example):

static globalfunctiondef_t globalfunctiondefs[] = {
	{&pypy_gfunc_sieve_of_eratosthenes, "pypy_gfunc_sieve_of_eratosthenes", 
{"sieve_of_eratosthenes", 
(PyCFunction)pypy_g_pyfn_sieve_of_eratosthenes, 
METH_VARARGS|METH_KEYWORDS, {
83,105,101,118,101,32,111,102,32,69,114,97,116,111,115,116,104,101,110,101,
115,10,32,32,32,32,10,32,32,32,32,84,104,105,115,32,111,110,101,32,
105,115,32,102,114,111,109,32,97,110,32,105,110,102,97,109,111,117,115,32,
98,101,110,99,104,109,97,114,107,44,32,34,84,104,101,32,71,114,101,97,
116,32,67,111,109,112,117,116,101,114,10,32,32,32,32,76,97,110,103,117,
97,103,101,32,83,104,111,111,116,111,117,116,34,46,10,10,32,32,32,32,
85,82,76,32,105,115,58,32,104,116,116,112,58,47,47,119,119,119,46,98,
97,103,108,101,121,46,111,114,103,47,126,100,111,117,103,47,115,104,111,111,
116,111,117,116,47,10,32,32,32,32}}},
	{ NULL }	/* Sentinel */
};

I'm not too familiar with structure initialization in MSVC's compiler, 
but it seems to barf on that one. If anyone has a quick answer, then I 
am all ears, otherwise I'll have to do some research.

-- 
Scott Dial
scott at scottdial.com
scodial at indiana.edu



More information about the Pypy-dev mailing list