re-expose new_ident in a restricted way
parent
1624938c0b
commit
c2de63be25
|
@ -371,6 +371,8 @@ struct LIBCUBESCRIPT_EXPORT state {
|
||||||
std::string_view n, std::string_view v, bool read_only = false,
|
std::string_view n, std::string_view v, bool read_only = false,
|
||||||
var_type vtp = var_type::DEFAULT
|
var_type vtp = var_type::DEFAULT
|
||||||
);
|
);
|
||||||
|
ident *new_ident(std::string_view n);
|
||||||
|
|
||||||
void reset_var(std::string_view name);
|
void reset_var(std::string_view name);
|
||||||
void touch_var(std::string_view name);
|
void touch_var(std::string_view name);
|
||||||
|
|
||||||
|
|
|
@ -464,6 +464,10 @@ LIBCUBESCRIPT_EXPORT string_var *state::new_svar(
|
||||||
return sv;
|
return sv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LIBCUBESCRIPT_EXPORT ident *state::new_ident(std::string_view n) {
|
||||||
|
return p_tstate->istate->new_ident(*this, n, IDENT_FLAG_UNKNOWN);
|
||||||
|
}
|
||||||
|
|
||||||
LIBCUBESCRIPT_EXPORT void state::reset_var(std::string_view name) {
|
LIBCUBESCRIPT_EXPORT void state::reset_var(std::string_view name) {
|
||||||
ident *id = get_ident(name);
|
ident *id = get_ident(name);
|
||||||
if (!id) {
|
if (!id) {
|
||||||
|
|
Loading…
Reference in New Issue