octave-maintainers
[Top][All Lists]
Advanced

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

Re: "oct files" within the embedder


From: John W. Eaton
Subject: Re: "oct files" within the embedder
Date: Mon, 20 Feb 2006 16:23:09 -0500

On 20-Feb-2006, Sebastien Loisel wrote:

| Does that mean there's no way for me to add to the symbol table ex post
| facto other than mkoctfile? Linking against an untouched
| liboctave/libinterp/whatever, can I populate the symbol table
| programmatically at run time?

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "defun.h"
#include "oct-obj.h"
#include "variables.h"

  extern octave_value_list Ffoo (const octave_value_list&, int);
  install_builtin_function (Ffoo, "foo", "doc string", is_cmd);

Set is_cmd to true if you want it to be possible to call the function
as a command (like "load", for example).

This is essentially waht builtins.cc does if you decipher the macros.

jwe



reply via email to

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