Skip to content

Conversation

ngoldbaum
Copy link
Member

common_instance must return a new reference, but in these two dtypes I was returning a borrowed reference instead. This ended up not being a problem for metadatadtype because of a missing Py_DECREF in get_metadata, but was a problem for ASCIIDType because there isn't any indirection to get the dtype's "value" so there wasn't an opportunity to make an identical bug.

This PR fixes reference counting issues in both dtypes, adds a new test for ASCIIDType to check that creating an array from scalars works correctly, and fills out common_instance for asciidtype based on the size attribute.

@ngoldbaum
Copy link
Member Author

Going to self-merge, but if you're reading this and spot any issues please let me know and I'll come back to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant