Remove arg_check! in tokenize
@@ -6,14 +6,12 @@ use std::iter::FromIterator;
use rustpython_parser::lexer;
-use crate::function::PyFuncArgs;
-use crate::obj::objstr;
+use crate::obj::objstr::PyStringRef;
use crate::pyobject::{PyObjectRef, PyResult};
use crate::vm::VirtualMachine;
-fn tokenize_tokenize(vm: &VirtualMachine, args: PyFuncArgs) -> PyResult {
- arg_check!(vm, args, required = [(readline, Some(vm.ctx.str_type()))]);
- let source = objstr::borrow_value(readline);
+fn tokenize_tokenize(s: PyStringRef, vm: &VirtualMachine) -> PyResult {
+ let source = s.as_str();
// TODO: implement generator when the time has come.
let lexer1 = lexer::make_tokenizer(source);
