Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!wuarchive!husc6!endor!siegel From: siegel@endor.harvard.edu (Rich Siegel) Newsgroups: comp.sys.mac.programmer Subject: Re: Passing pointers to functions (was Re: HLock) Message-ID: <3508@husc6.harvard.edu> Date: 29 Dec 89 00:46:16 GMT References: <859@lclark.UUCP> <9389@hoptoad.uucp> <5832@umd5.umd.edu> Sender: news@husc6.harvard.edu Reply-To: siegel@endor.UUCP (Rich Siegel) Organization: Symantec Language Products Group Lines: 34 In article <5832@umd5.umd.edu> zben@umd5.umd.edu (Ben Cranston) writes: >In article <859@lclark.UUCP> dan@lclark.UUCP (Dan Revel) writes: > >> Is it safe to pass pointers to functions >> across segment boundaries? (I think this question might be > >The other case is also worth considering. Suppose you take a pointer to >a local function (so the pointer generated is to the real function, not to >a jump table entry). You then pass this pointer to a function in another I don't know about other development systems, but if you take the address of a function in THINK C or THINK Pascal, a jump table entry gets generated for that function if one does not already exist. This is to avoid exactly this sort of thing. Of course, you can take the absolute address of a local function in assembly language, but that's your funeral... R. ~~~~~~~~~~~~~~~ Rich Siegel Staff Software Developer Symantec Corporation, Language Products Group Internet: siegel@endor.harvard.edu UUCP: ..harvard!endor!siegel "When someone who makes four hundred and fifty dollars an hour wants to tell you something for free, it's a good idea to listen." ~~~~~~~~~~~~~~~