Track for new and join on both str and unicode#40
Track for new and join on both str and unicode#40nanjekyejoannah wants to merge 3 commits intosoftdevteam:regression_fixfrom
Conversation
| */ | ||
| typedef struct _object { | ||
| PyObject_HEAD | ||
| Py_ssize_t ob_bstate; |
There was a problem hiding this comment.
Don't we want to put this only in strings/bytes, rather than in every object? Or is that not possible?
There was a problem hiding this comment.
Some methods use the abstract object type see: #39 , so it is necessary.
There was a problem hiding this comment.
I'm unsure what it means to ask for the bstate of something that isn't a string. Maybe I'm missing something!
| * original sequence can be iterated over | ||
| * again, so we must pass seq here. | ||
| */ | ||
| if (!PyString_Check(item) && !item->ob_bstate == NULL) { |
There was a problem hiding this comment.
What I now realise is we probably need a Py_GetBState(...) function that returns (say) -1 for "not string/unicode" and then 0/1/2/3/whatever for the actual bstate. That way we can avoid putting bstate on every object.
There was a problem hiding this comment.
Today I started to add Py_GetBState, I broke other tests that I am still fixing.
|
Lets figure out tracking in before we get back here |
Tracking for new and join operations, applied to both unicode and bytes.
This tracking breaks ordinal configurations for unicode, so before I reconfigure, let us confirm with this PR if this is the intended design from our discussion of the minimal example in the google doc on the string assumptions.