Avoid dramatic changes in the resulting .c file when the input .pyx file changes only slightly. #49

Merged
merged 1 commit into from Sep 7, 2013

Conversation

Projects
None yet
4 participants
Contributor

denik commented Aug 2, 2011

This makes cython-ifdef produce better output and also produces code that is more readable.

It replaces sequential counter in Code.py with a simple function that converts any string to identifier by stripping bad characters.

Generate variable names based on content
Generate variable names in new_const_cname() based on content of the variable
rather than using a counter straight away.

How about placing the[:32] on value directly?

Owner

denik replied Aug 2, 2011

good point, I actually do that in dd95489

Contributor

scoder commented Aug 13, 2011

Could you update your pull request with your latest changes?

Contributor

scoder commented Sep 17, 2011

Any news on this?

Contributor

larsmans commented Sep 7, 2013

@scoder Any reason not to pull this patch as-is? It applies cleanly on current master and tests run fine.

Contributor

robertwb commented Sep 7, 2013

Looks good to me.

robertwb added a commit that referenced this pull request Sep 7, 2013

Merge pull request #49 from denik/7d7751ac5192c68d3501e48f663f2cae77a…
…57990

Avoid dramatic changes in the resulting .c file when the input .pyx file changes only slightly.

@robertwb robertwb merged commit d50e6aa into cython:master Sep 7, 2013

Contributor

scoder commented Sep 14, 2013

This change broke a lot of CPython tests due to non-unique cnames and/or lost string constants. I'm currently fixing it and extending the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment