www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/13/02:34:59

From: j DOT aldrich6 AT genie DOT com
Message-Id: <199604130618.AA235926306@relay1.geis.com>
Date: Sat, 13 Apr 96 06:09:00 UTC 0000
To: djgpp AT delorie DOT com
Mime-Version: 1.0
Subject: Re: A Proper Cast for a Funtio

Reply to message 2326795    from JETMAN AT GNN DOT CO on 04/12/96  2:45AM


>	John:  Actually, the easier solution is the cast.  The proj
>I'm working on is a legacy app (mentioned in my orig post) and the old
>fn is similar to qsort() in that it specs that one of its formal args
>is a ptr to a fn.  But rather than code a three/four line wrapper every
>time I needed to use a different fn type (w/ an unsigned arg instead
>of an int) I wanted to use a cast that would be shorter to write.  Of
>course, responding to the e-mail traffic from my question has negated that
>savings. :-)  You're right, though, and I *did* think about usg a
>wrapper at first, then decided this was a moment to pose a question
>to the folks on the 'net and learn an obscure bit of C notation that's
>eluded me in the past.

Actually, as long as the arguments/return values for the typecasted
function have the same number of bytes as the caller expects, there
shouldn't be a problem, or at least that's the way it seemsto me...

Anyway, I'm more than glad to have been of help.  :)

John

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019