grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Function parameters support


From: BVK Chaitanya
Subject: Re: [PATCH] Function parameters support
Date: Wed, 12 May 2010 10:29:01 +0530

2010/5/9 Vladimir 'φ-coder/phcoder' Serbinenko <address@hidden>:
> The only place where new scope is added or removed is:
> +  grub_list_push (GRUB_AS_LIST_P (&scope), GRUB_AS_LIST (&new_scope));
> +
> +  ret = grub_script_execute (func->func);
> +
> +  grub_list_pop (GRUB_AS_LIST_P (&scope));
> +
> So you can actually do sth like:
> int current_script_argc;
> char *current_script_args;
>
> And have an update function with:
> saved_args = current_script_args;
> saved_argc = current_script_argc;
> current_script_args = ..
> current_script_argsc = ...;
> ret = ....;
> current_script_args = saved_args;
> current_script_argc = saved_argc;

Yes, replaced it as above as part of adding $@ and $* support.

>
> -  grub_env_set ("?", errnobuf);
> +  grub_script_env_set ("?", errnobuf);
> Any use of this change?
>

No, is reverted back :-)



thanks,
-- 
bvk.chaitanya



reply via email to

[Prev in Thread] Current Thread [Next in Thread]