summaryrefslogtreecommitdiff
path: root/python/src/grammar.pxi
diff options
context:
space:
mode:
authorVictor Chahuneau <vchahune@cs.cmu.edu>2012-07-28 20:11:56 -0400
committerVictor Chahuneau <vchahune@cs.cmu.edu>2012-07-28 20:11:56 -0400
commitfd5e2c6858c7522917d6498bdb074b6d03cbacf2 (patch)
tree062c43f94d08300b8532ce4d1be16087aa0b309e /python/src/grammar.pxi
parent9d54348bc14ace7f2629efd145d452650e13684a (diff)
[python] Fix grammar non-terminal memory bug
Diffstat (limited to 'python/src/grammar.pxi')
-rw-r--r--python/src/grammar.pxi6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/src/grammar.pxi b/python/src/grammar.pxi
index 5ec21422..59266238 100644
--- a/python/src/grammar.pxi
+++ b/python/src/grammar.pxi
@@ -6,9 +6,9 @@ def _phrase(phrase):
return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase)
cdef class NT:
- cdef public char* cat
+ cdef public bytes cat
cdef public unsigned ref
- def __init__(self, cat, ref=0):
+ def __init__(self, char* cat, unsigned ref=0):
self.cat = cat
self.ref = ref
@@ -19,7 +19,7 @@ cdef class NT:
cdef class NTRef:
cdef public unsigned ref
- def __init__(self, ref):
+ def __init__(self, unsigned ref):
self.ref = ref
def __str__(self):