From: Charlie Brej Date: Tue, 30 Jun 2009 14:28:31 +0000 (+0100) Subject: [script] Deref the state to allow local and global to be reassigned X-Git-Tag: 0.7.0~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=985a3c030e68941dfa35fc9d2daf9c4df901e2ea;p=thirdparty%2Fplymouth.git [script] Deref the state to allow local and global to be reassigned This should allow local and global to be assigned to a different vareable. This is discouriged as it may cause asserts to fail, but may be useful to save current state and continue the function at a later time. --- diff --git a/src/plugins/splash/script/script-execute.c b/src/plugins/splash/script/script-execute.c index 2b8c0868..f2edcccf 100644 --- a/src/plugins/splash/script/script-execute.c +++ b/src/plugins/splash/script/script-execute.c @@ -366,6 +366,8 @@ static script_obj* script_evaluate_var (script_state* state, script_exp* exp) { char* name = exp->data.string; script_obj* obj; + script_obj_deref(&state->global); + script_obj_deref(&state->local); assert (state->global->type == SCRIPT_OBJ_TYPE_HASH); assert (state->local->type == SCRIPT_OBJ_TYPE_HASH);