octave-maintainers
[Top][All Lists]
Advanced

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

Re: declarations for built-in DEFUN functions


From: Daniel J Sebald
Subject: Re: declarations for built-in DEFUN functions
Date: Wed, 19 Sep 2012 00:24:16 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 09/18/2012 03:23 PM, John W. Eaton wrote:
On 18-Sep-2012, Rik wrote:

|>
|>  Message: 7
|>  Date: Tue, 18 Sep 2012 15:41:47 -0400
|>  From: "John W. Eaton"<address@hidden>
|>  To: octave maintainers mailing list<address@hidden>
|>  Subject: declarations for built-in DEFUN functions
|>  Message-ID:<address@hidden>
|>  Content-Type: text/plain; charset="us-ascii"
|>
|>  Some questions:
|>
|>  * Nearly all source files already have corresponding header files.
|>  Should we include the -defun-decls.h files there instead of in the
|>  .cc files?
|
| I would expect to find exported function prototypes in header files so this
| makes sense to me.

What about for the functions in the libinterp/corefcn directory?
Those don't currently have corresponding header files.  Should they,

I'd say no. Reason being that the contents of these files really isn't OOP code using the C++ constructs. It is the class definitions of C++ that typically have a header-file/code-file combo. I think they could be called .c rather than .cc for valid reasons. Similarly, the lex.cc code could be compiled under C which would eliminate some cast warnings.


or should we just use the -defun-decls.h files for them?  There are 66
files there, and more than half of those files provide only a single
function.  So if we create header files for each of them we would be
adding another 66 header files in addition to the 66 generated
-defun-decls.h files.  Or, I suppose we could treat those files
specially and generate foo.h instead of foo-defun-decls.h.

Another option I considered was to just lump all these declarations
together in builtins.h and not generate separate header files for each
source file that defines a built-in function.

Yes that sounds very good.

Dan


reply via email to

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