]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[script] Deref the state to allow local and global to be reassigned
authorCharlie Brej <cbrej@cs.man.ac.uk>
Tue, 30 Jun 2009 14:28:31 +0000 (15:28 +0100)
committerRay Strode <rstrode@redhat.com>
Fri, 24 Jul 2009 13:30:15 +0000 (09:30 -0400)
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.

src/plugins/splash/script/script-execute.c

index 2b8c086888883ec25ba6ae20d5dc5f2b9d226400..f2edcccf76c3ed88fd31a3a160d97af853428826 100644 (file)
@@ -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);