Skip to content

Commit 2697eed

Browse files
authored
Update libgap.pyx
adding str_to_bytes
1 parent a5928fd commit 2697eed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sage/libs/gap/libgap.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ from .gap_includes cimport *
217217
from .util cimport *
218218
from .element cimport *
219219

220+
from sage.cpython.string cimport str_to_bytes
220221
from sage.structure.parent cimport Parent
221222
from sage.structure.element cimport Vector
222223
from sage.rings.integer_ring import ZZ
@@ -539,7 +540,7 @@ class Gap(Parent):
539540
...
540541
GAPError: Error, VAL_GVAR: No value bound to FooBar
541542
"""
542-
return make_any_gap_element(self, GAP_ValueGlobalVariable(variable))
543+
return make_any_gap_element(self, GAP_ValueGlobalVariable(str_to_bytes(variable)))
543544

544545
def global_context(self, variable, value):
545546
"""

0 commit comments

Comments
 (0)