-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use type int for comparisons not enum
Summary: It's inefficient to access `self.type.value`, specifically the second `.value` access, which is pure python `enum.Enum`. We can make a statically typed cython access on the internal data `int` instead. This fixes a bug that occurs when unions with a field called `type` are compared. This fix is agnostic about what direction we want to take this API. Reviewed By: yoney Differential Revision: D67160589 fbshipit-source-id: 6d6471623ed11985e5bf0d334363cec89a2f44a9
- Loading branch information
1 parent
d4eb8f4
commit e476ebe
Showing
2 changed files
with
47 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters