[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using DFUNX_DLD macro

From: John W. Eaton
Subject: Using DFUNX_DLD macro
Date: Fri, 2 Mar 2007 11:45:21 -0500

On  2-Mar-2007, Hall, Benjamin wrote:

| I'm trying to use the octave_sockets code that was posted here
| in a relatively recent CVS version of octave.  The original used the
| DEFCONSTX macro to define built-in constants.  As these are no longer
| supported, I am trying to replace those with built-in functions (similar to
| F_GETFD in, but I'm having trouble.
| For example, if I compile the code (at end of message), then, in octave
| autoload("AF_INET","try2.oct")
| autoload("MY_CONSTANT","try2.oct")
| I am able to access MY_CONSTANT, but not AF_INET.  Can someone help me with
| some insight as to what I should be doing?

| // What is the "fsname" in DEFUNX_DLD ?
| #if defined (AF_INET)

This should be


The third argument is the name of a function that the DEFUNX_DLD macro
generates and Octave looks for when loading the function.  It must
have the FS prefix and the rest of the name must be the same as the
scripting language function you are defining (in this case AF_INET).
If it isn't named this way, then Octave won't be able to load the
function corresponding to AF_INET when it loads the .oct file.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]