On 11/18/23 19:32, Waldek Hebisch wrote:
This really says nothing about 'extern' declarations on Lisp side.
And times have changed: old C had "implict int" rule governing
undeclared functions, but this rule for many years were considered
obsolete and now is gone from C standard. More important, C
compilers frequently are configured to reject code trying to
use undeclared functions.
So, let me reiterate: extern declarations are needed. Now they
should be present for all calls. For calls returning 'double'
even with old rules call would not work (we would silently get
wrong code). I did not add declarations earlier, as this
could be done by Lisp implementation. But ECL folks do not
want to do this, so we add them on FriCAS side. It is likely
that GCL also is not adding declarations and that we need to
add them on our side.
I can fix this in a later commit.
know why you want to move definition of 'sockSendString'?
It is closely related to 'sock_send_string_len' and keeping
them together looks clearer for me.
It is enclosed in "foreign-defs", which is defined differently
for CMUCL and CLISP. So for consistency, I'd like to move
it out of "foreign-defs".
'sockSendString' can not work without 'sock_send_string_len',
so effectively its definition is complete only when "foreign-defs"
are done. And 'sockSendString' is clesely related to 'sock_send_string_len'.
So IMO "foreign-defs" is red herring here, for consistency we
should keep the two functions together.
Fine by me. But what about |sockGetStringFrom|? Shall it be enclosed
inside "foreign-defs" as well?
I'll leave this change and commit the rest.
- Qian
--
You received this message because you are subscribed to the Google Groups "FriCAS -
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/fcc51c55-cc70-4879-a3b7-7afb46db5a3e%40gmail.com.