Forwarding this on for Tim. The list wasn't letting him subscribe for some reason. Hopefully he's subscribed now after a little manual intervention.On Oct 8, 2006, at 8:20 PM, Tim Hoffman wrote: Hi
I added the following comment to the comments section on rdflib.net, but thought I would post it here as well (having noted some questions re: the bisonparser for windows on the list)
I am trying to compile the bison code in rdflib 2.3.2 on Windows XP using VC7 for Python 2.3.4. All going fine except for all the inline declarations of such as PyObject *mlist = PyObject_CallMethod...... in SPARQLParser.c
By declaring mList at the top of of the function parser_parse (where yyval is declared) I can get it to compile.
i.e.
static PyObject* parser_parse(register parserobject *self, PyObject *text) { register int yystate; register int yyn;
PyObject *yylval = NULL; PyObject *yyval = NULL; PyObject *mList = NULL;
and changing all the uses of mList from
PyObject *mList = PyObject_CallMethod(_expression_,
to
mList = PyObject_CallMethod(_expression_,
I looked at logging this in the trac, but it seems to be full of spam.
I assume this is the correct thing to do ;-) The inline declaration seems to be a bit of C++ thing, but C doesn't like it much, similiar things have happened in numpy see: http://www.nabble.com/forum/ViewPost.jtp?post=6150794&framed=y
Also there seems to be a conflict in macro declarations, but it doesn't seem to ultimately break anything (as yet ;-)
src\bison\SPARQLParser.c(39) : warning C4005: 'PREFIX' : macro redefinition d:\Python24\include\pyconfig.h(43) : see previous definition of 'PREFIX'
pyconfig.h is a hand tuned set of definitions for windows.
Now on to making tests run ;-)
Rgds
Tim |
_______________________________________________
Dev mailing list
[email protected]
http://rdflib.net/mailman/listinfo/dev