[Stackless] Python 2.5 & Strange Compilation Warning
bjt at pmp.com.au
Fri Mar 30 07:20:04 CEST 2007
This is primarily for Richard & Christian, although I'm putting it on
the list as it may interest others.
I have almost finished the example application on how I intend to
implement a multi-threaded server with Stackless Tasklets dedicated to a
single thread (i.e. scripting in one thread, network access/monitoring
in another thread, database access in yet another thread, etc). I used
the Stackless embed demo as inpisration, but rewrote the code I required
(as the license on the demo was not conducive to "commercial allowed"
sharing to my understanding).
In the process I believe I fixed a few shortcomings and discovered a
weird compiler wanring that made me scratch my head. The shortcomings in
the demo I will outline when I submit my framework to the list, but the
weird warning I thought I would raise now.
As background, I am using Boost.Python to embed Stackless within an
application context & am using the Stackless Python 2.5 release. I made
some "hackish" changes to Boost.Python in order to compile the
application without warnings popping up all the time (Python 2.5 uses
Py_ssize_t instead of int for "size" values now, Boost has not been
updated to reflect this - I simply cast down to int in all areas that
complained of this problem). I am using MSVC 7.1 to compile the
application (but am using Python, Boost, and Standard headers only in an
effort to make the framework as cross-platform as possible).
The weird error is that whenever I compile the application, I get the
"stackless_impl.h(82) : warning C4273: 'PyEval_EvalFrameEx_slp' :
inconsistent dll linkage"
Looking at the source code in question, it would appear that
'PyEval_EvalFrameEx_slp' is the only function without a PyAPI_FUNC(...)
wrapper around the return value. I do not know enough about the
internals of Stackless to know whether I should change this or not.
Given that the rest of Stackless has no warnings associated with the
compilation - I am curious as to what makes this function special or why
(if it is not special) the warning is raised?
Stackless mailing list
Stackless at stackless.com
More information about the Stackless