diff --git a/src/ccall.cpp b/src/ccall.cpp index f75426033a37f..196ec82ee802f 100644 --- a/src/ccall.cpp +++ b/src/ccall.cpp @@ -366,7 +366,7 @@ static native_sym_arg_t interpret_symbol_arg(jl_value_t *arg, jl_codectx_t *ctx, } if (jl_is_symbol(ptr)) f_name = jl_symbol_name((jl_sym_t*)ptr); - else if (jl_is_byte_string(ptr)) + else if (jl_is_string(ptr)) f_name = jl_string_data(ptr); if (f_name != NULL) { // just symbol, default to JuliaDLHandle @@ -383,13 +383,13 @@ static native_sym_arg_t interpret_symbol_arg(jl_value_t *arg, jl_codectx_t *ctx, jl_value_t *t1 = jl_fieldref(ptr,1); if (jl_is_symbol(t0)) f_name = jl_symbol_name((jl_sym_t*)t0); - else if (jl_is_byte_string(t0)) + else if (jl_is_string(t0)) f_name = jl_string_data(t0); else JL_TYPECHKS(fname, symbol, t0); if (jl_is_symbol(t1)) f_lib = jl_symbol_name((jl_sym_t*)t1); - else if (jl_is_byte_string(t1)) + else if (jl_is_string(t1)) f_lib = jl_string_data(t1); else JL_TYPECHKS(fname, symbol, t1); @@ -653,10 +653,10 @@ static jl_cgval_t emit_llvmcall(jl_value_t **args, size_t nargs, jl_codectx_t *c jl_error("Tuple as first argument to llvmcall must have exactly two children"); decl = jl_fieldref(ir,0); ir = jl_fieldref(ir,1); - if (!jl_is_byte_string(decl)) + if (!jl_is_string(decl)) jl_error("Declarations passed to llvmcall must be a string"); } - bool isString = jl_is_byte_string(ir); + bool isString = jl_is_string(ir); bool isPtr = jl_is_cpointer(ir); if (!isString && !isPtr) { jl_error("IR passed to llvmcall must be a string or pointer to an LLVM Function"); diff --git a/src/cgutils.cpp b/src/cgutils.cpp index 12e21221dbcbe..2d790b5b56f43 100644 --- a/src/cgutils.cpp +++ b/src/cgutils.cpp @@ -1598,7 +1598,7 @@ static void emit_setfield(jl_datatype_t *sty, const jl_cgval_t &strct, size_t id static bool might_need_root(jl_value_t *ex) { return (!jl_is_symbol(ex) && !jl_is_slot(ex) && !jl_is_ssavalue(ex) && - !jl_is_bool(ex) && !jl_is_quotenode(ex) && !jl_is_byte_string(ex) && + !jl_is_bool(ex) && !jl_is_quotenode(ex) && !jl_is_string(ex) && !jl_is_globalref(ex)); } diff --git a/src/interpreter.c b/src/interpreter.c index d1754101378f6..a93d6128cbb8e 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -414,7 +414,7 @@ static jl_value_t *eval(jl_value_t *e, jl_value_t **locals, jl_lambda_info_t *la else if (ex->head == error_sym || ex->head == jl_incomplete_sym) { if (nargs == 0) jl_error("malformed \"error\" expression"); - if (jl_is_byte_string(args[0])) + if (jl_is_string(args[0])) jl_errorf("syntax: %s", jl_string_data(args[0])); jl_throw(args[0]); } diff --git a/src/jlapi.c b/src/jlapi.c index 06d0ec8b4c215..479132d996c59 100644 --- a/src/jlapi.c +++ b/src/jlapi.c @@ -290,7 +290,7 @@ static const char *git_info_string(const char *fld) if (!GIT_VERSION_INFO) GIT_VERSION_INFO = jl_get_global(jl_base_module, jl_symbol("GIT_VERSION_INFO")); jl_value_t *f = jl_get_field(GIT_VERSION_INFO, fld); - assert(jl_is_byte_string(f)); + assert(jl_is_string(f)); return jl_string_data(f); } diff --git a/src/julia.h b/src/julia.h index 02dd3d72e66f9..8066af83bc133 100644 --- a/src/julia.h +++ b/src/julia.h @@ -863,8 +863,7 @@ static inline uint32_t jl_fielddesc_size(int8_t fielddesc_type) #define jl_is_module(v) jl_typeis(v,jl_module_type) #define jl_is_mtable(v) jl_typeis(v,jl_methtable_type) #define jl_is_task(v) jl_typeis(v,jl_task_type) -#define jl_is_utf8_string(v) jl_typeis(v,jl_string_type) -#define jl_is_byte_string(v) jl_is_utf8_string(v) +#define jl_is_string(v) jl_typeis(v,jl_string_type) #define jl_is_cpointer(v) jl_is_cpointer_type(jl_typeof(v)) #define jl_is_pointer(v) jl_is_cpointer_type(jl_typeof(v))