Skip to content

Conversation

@mdboom
Copy link
Member

@mdboom mdboom commented Nov 5, 2015

No description provided.

src/sfntnames.c Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Learning the c-api very slowly. https://docs.python.org/3.5/c-api/exceptions.html#c.PyErr_Format says it always returns NULL, could this be simplified to

return PyErr_Format(PyExc_KeyError, "No name of type %d", name);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. That's not a bad idea.

tacaswell added a commit that referenced this pull request Nov 6, 2015
SfntNames.get_name() raises KeyError if missing
@tacaswell tacaswell merged commit 24d3ac0 into matplotlib:master Nov 6, 2015
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.

2 participants