[Top][All Lists]

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

Re: Eliminating nested functions

From: Pavel Roskin
Subject: Re: Eliminating nested functions
Date: Sun, 19 Apr 2009 10:29:58 -0400
User-agent: Internet Messaging Program (IMP) H3 (4.1.4)

Quoting Bean <address@hidden>:

Yeah, I agree with you. The conversion will take some effort, but it
could payoff in the long run. Perhaps we can achieve this in two

1, Change nested function definition to accept only one parameter. For
function with multiple parameters, place them in a structure and pass
the pointer. This would eliminate NESTED_FUNC_ATTR, as the regparm
issue won't occur in function with only one parameter.

2. Eliminate nested function. This would be easier after step 1. As we
now pass parameters in a structure, we can append extra variables at
the end, and cast it to the required type. Inside the callback
function, we cast it back to use the extra fields.

That's an excellent plan!  Thank you!

Considering the amount of changes, it may be a good idea to use the git mirror with stgit, so that several patches can be made and everything is well tested together before applying.

Pavel Roskin

reply via email to

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