Skip to content
Permalink
Browse files

Minor typo fixes in comments/messages/docs. (#522)

  • Loading branch information...
pfalcon authored and msullivan committed Jan 23, 2019
1 parent b46f467 commit bf83c783bacdb7b6879431a7562e78f7e970c596
Showing with 5 additions and 5 deletions.
  1. +1 −1 doc/future.md
  2. +1 −1 mypyc/emit.py
  3. +1 −1 mypyc/genops.py
  4. +1 −1 mypyc/lib-rt/CPy.c
  5. +1 −1 mypyc/ops.py
@@ -28,7 +28,7 @@ replaced with more efficient operations. Examples:
single three-operand concatenation that doesn't construct an single three-operand concatenation that doesn't construct an
intermediate object. intermediate object.
* `x in {1, 3}` can be translated into `x == 1 or x == 2` (more * `x in {1, 3}` can be translated into `x == 1 or x == 3` (more
generally we need to evaluate all right-hand-side items). generally we need to evaluate all right-hand-side items).
## Integer Range Analysis ## Integer Range Analysis
@@ -600,7 +600,7 @@ def emit_unbox(self, src: str, dest: str, typ: RType, custom_failure: Optional[s


def emit_box(self, src: str, dest: str, typ: RType, declare_dest: bool = False, def emit_box(self, src: str, dest: str, typ: RType, declare_dest: bool = False,
can_borrow: bool = False) -> None: can_borrow: bool = False) -> None:
"""Emit code for boxing a value of give type. """Emit code for boxing a value of given type.
Generate a simple assignment if no boxing is needed. Generate a simple assignment if no boxing is needed.
@@ -9,7 +9,7 @@ def f(x: int) -> int:
r0 = 2 r0 = 2
r1 = 1 r1 = 1
r2 = x * i0 :: int r2 = x * r0 :: int
r3 = r2 + r1 :: int r3 = r2 + r1 :: int
return r3 return r3
""" """
@@ -6,7 +6,7 @@


// TODO: Currently only the things that *need* to be defined a single time // TODO: Currently only the things that *need* to be defined a single time
// instead of copied into every module live here. This is silly, and most // instead of copied into every module live here. This is silly, and most
// of the code in CPy.h and python_support.h should move here. // of the code in CPy.h and pythonsupport.h should move here.


struct ExcDummyStruct _CPy_ExcDummyStruct = { PyObject_HEAD_INIT(NULL) }; struct ExcDummyStruct _CPy_ExcDummyStruct = { PyObject_HEAD_INIT(NULL) };
PyObject *_CPy_ExcDummy = (PyObject *)&_CPy_ExcDummyStruct; PyObject *_CPy_ExcDummy = (PyObject *)&_CPy_ExcDummyStruct;
@@ -97,7 +97,7 @@ def __init__(self,
elif ctype == 'char': elif ctype == 'char':
self.c_undefined = '2' self.c_undefined = '2'
else: else:
assert False, 'Uncognized ctype: %r' % ctype assert False, 'Unrecognized ctype: %r' % ctype


def accept(self, visitor: 'RTypeVisitor[T]') -> T: def accept(self, visitor: 'RTypeVisitor[T]') -> T:
return visitor.visit_rprimitive(self) return visitor.visit_rprimitive(self)

0 comments on commit bf83c78

Please sign in to comment.
You can’t perform that action at this time.