Closed AphonicChaos closed 12 years ago
If I'm not mistaken, this will clash with user-made drawables that have an __iter__()
method. Instead I simply added tuple
in the type-check with instanceof()
. I also removed the <list>
casts that I added in the past and are actually useless.
I'm also not sure whether testing for __iter__
is enough, since I need to use len()
as well for allocating the C++ vertex array. For example, generators support iteration for not len()
.
I tested this by changing the custom drawables example to use a tuple instead of a list, compiling, and running the code (of course having to add those declarations you mentioned to sfml.cpp).
Mind you, this patch still allows lists to be sent. There is also no worry of strings being processed as a "list".