octave-maintainers
[Top][All Lists]
Advanced

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

Re: What to do with builtin functions not in libinterp subdirectory


From: John W. Eaton
Subject: Re: What to do with builtin functions not in libinterp subdirectory
Date: Mon, 18 Mar 2013 16:26:29 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121122 Icedove/10.0.11

I'm attaching something you can play with if you like.

I kept the Ffoo function definition. I don't see that it helps to have these built-in functions defined as member functions of a class. I think it is convenient that we can call them using Ffoo anywhere in Octave now. That's another thing you'll need to address, which is how to generate the list of declarations that is currently stored in builtin-defun-decls.h.

Anyway, this code crashes Octave on startup for me because place where these function pointers are stored is symbol_table::fcn_table, and that is a static object which apparently for me is not initialized ahead of the first call to the builtin_function_installer constructor.

One solution would be to use a singleton object for fcn_table instead of a static data member. That would not be too hard to do, I suppose.

jwe

Attachment: diffs.txt
Description: Text document


reply via email to

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