CodeGen_PECL int pass-by-reference

From: Date: Fri, 07 Sep 2007 14:26:51 +0000
Subject: CodeGen_PECL int pass-by-reference
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-27893@lists.php.net to get a copy of this message
Hello list, Question about CodeGen_PECL: I'm trying to use this to write a wrapper extension for the netCDF C libraries ( http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-c/index.html#Top ). but they have a nasty habit of returning values as pass-by-reference. So far I'm not finding a good example of or documentation for how to do this. My attempts so far don't work, and usually show a message like the following when compiling: warning: passing argument 3 of 'nc_open' from incompatible pointer type I'm not a C guru, which could be part of the problem, but still... Could somebody give me an example of what the <function> tag should look like for, say the nc_open function? I think I can figure the rest out on my own after that. The C prototype is: int nc_open (const char *path, int omode, int *ncidp); Its the last parameter I'm having trouble with, primarily. I need to be able to get its value back, so I can pass it to other functions. Thanks much! -Matt

« previous php.pear.general (#27893) next »