adamlwgriffiths / cyglfw3

Cython bindings for GLFW3
Other
20 stars 6 forks source link

Request to merge for added 3.4 support. #18

Closed Emilgardis closed 8 years ago

Emilgardis commented 8 years ago

This will hopefully fix problems for 3.x users and not change behaviour for 2.x users.

I am uncertain of the changes done on line 724 and 924 in the generate_cython.py Issue #14

adamlwgriffiths commented 8 years ago

The comments here suggest doing what you've done with char*. Although he has a more robust type cast for strings. http://grokbase.com/t/gg/cython-users/1452sbq03f/cython-giving-errors-about-python-3-when-checking-for-char-in-a-tuple http://docs.cython.org/src/tutorial/strings.html Might be worth implementing. I can do so later if its a hassle.

Could you go through and replace any tabs with spaces in generate_cython.

Emilgardis commented 8 years ago

That's the site I used to see how to do it, however, his examples are only for 3 behaviour in 2.x (If I'm not mistaken)

adamlwgriffiths commented 8 years ago

Sweet!

infowantstobeseen commented 8 years ago

Anyone check to see if it worked w/ 2.x? Just curious

On Wed, Sep 30, 2015 at 6:27 PM, Adam Griffiths notifications@github.com wrote:

Sweet!

— Reply to this email directly or view it on GitHub https://github.com/adamlwgriffiths/cyglfw3/pull/18#issuecomment-144573112 .

T.J. Jankun-Kelly Associate Professor (Visualization, Analytics & Gaming) Computer Science & Engineering, Mississippi State University http://www.cse.msstate.edu/~tjk/ http://www.cse.msstate.edu/~tjk/ @dr_tj http://twitter.com/dr_tj

adamlwgriffiths commented 8 years ago

Looking at the code, I don't think there will be any problems. I'll run over it tonight. I should've done so before merging, it slipped my mind.

Emilgardis commented 8 years ago

Oh well, I don't believe there is any reason for it not working for 2.7. However, Is dropping the const a good idea?

adamlwgriffiths commented 8 years ago

Ran the tests, tests pass on python 2.7. Dropping const isn't the best idea, I'm not sure in terms of cython how it will treat it. The function itself doesn't alter it, so its more a 'correctness' issue than a true issue. However, there may be flow on effects in cython for optimisation. If there's any issues with the 'correctness' of the code, we can address them as we identify and understand them.