home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!gossip.pyramid.com!pyramid!infmx!news
- From: cortesi@informix.com (David Cortesi)
- Newsgroups: comp.databases.informix
- Subject: Re: memory allocation under AIX 3.2
- Message-ID: <1992Sep2.230122.16010@informix.com>
- Date: 2 Sep 92 23:01:22 GMT
- References: <9448@emory.mathcs.emory.edu>
- Sender: news@informix.com (Usenet News)
- Reply-To: cortesi@informix.com
- Organization: Informix Software, Inc.
- Lines: 25
-
- In article <9448@emory.mathcs.emory.edu> mm@ssf.pt (Manuel Monteiro) writes:
- > I have several ec functions similar to
- >
- > f(fgl_pcnt)
- > int fgl_pcnt;
- > {
- > ...;
- > char *x = malloc(...); /* x size is not known in compile time */
- >
- > ...; /* calculates x value */
- >
- > /* RETURN x */
- > pushquote(x, strlen(x));
- > doretalloc(1);
- > free( x ); /* must free x space before returning */
- > return(1);
- > }
-
-
- There is a retquote() function (also retint, retdub, etc etc)
- for precisely this purpose -- it copies the value to the 4GL stack
- instead of merely pushing the pointer.
-
- In the 4GL 4.1 Supplement manual there is an extensive discussion
- of the C-to-4GL API and these functions are documented there.
-