Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!ulysses!allegra!mit-eddie!husc6!hao!ames!necntc!linus!philabs!pwa-b!mmintl!franka From: franka@mmintl.UUCP Newsgroups: comp.lang.c Subject: Re: C blocks [ inlining ] Message-ID: <2638@mmintl.UUCP> Date: 9 Jan 88 00:13:38 GMT References: <470@PT.CS.CMU.EDU> <1966@chinet.UUCP> <970@csun.UUCP> <1313@sugar.UUCP> <3894@uw-june.UUCP> Reply-To: franka@mmintl.UUCP (Frank Adams) Organization: Multimate International, E. Hartford, CT. Lines: 26 Posted: Fri Jan 8 19:13:38 1988 In article <3894@uw-june.UUCP> pardo@uw-june.UUCP (David Keppel) writes: >[ adding the capability to "inline" ] >What you really want is to be able to inline a function some places and not >others Try: inline int inline_foo(int bar) { ... } int function_foo(int bar) { return inline_foo(bar) } (I'm not recommending the naming conventions, just the technique.) You have to duplicate the declaration part, but at least the code only has to be written once. This is also useful if you want to take the address of the function, although the compiler can deal with that automatically. -- Frank Adams ihnp4!philabs!pwa-b!mmintl!franka Ashton-Tate 52 Oakland Ave North E. Hartford, CT 06108