Remove function array declaration, which does not work in C++

This commit is contained in:
Juan Jose Garcia Ripoll 2009-03-28 23:06:53 +01:00
parent 00892c7569
commit 64f2670874

View file

@ -198,12 +198,6 @@
(wt-nl-h "static cl_object VV[VM];")
(wt-nl-h "#endif"))))
(let ((n-cfuns (length *global-cfuns-array*)))
(wt-nl-h "#define compiler_cfuns_size " n-cfuns)
(if (zerop n-cfuns)
(wt-nl-h "#define compiler_cfuns NULL")
(wt-nl-h "static const struct ecl_cfun compiler_cfuns[];")))
(dolist (l *linking-calls*)
(let* ((c-name (fourth l))
(var-name (fifth l)))
@ -698,18 +692,22 @@
(close-inline-blocks)))
(defun output-cfuns (stream)
(format stream "~%#ifndef compiler_cfuns~
~%static const struct ecl_cfun compiler_cfuns[] = {~
(let ((n-cfuns (length *global-cfuns-array*)))
(wt-nl-h "#define compiler_cfuns_size " n-cfuns)
(if (zerop n-cfuns)
(wt-nl-h "#define compiler_cfuns NULL")
(progn
(format stream "~%static const struct ecl_cfun compiler_cfuns[] = {~
~%~t/*t,m,narg,padding,name,block,entry*/");
(loop for (loc fname-loc fun) in (nreverse *global-cfuns-array*)
do (let* ((cfun (fun-cfun fun))
(minarg (fun-minarg fun))
(maxarg (fun-maxarg fun))
(narg (if (= minarg maxarg) maxarg nil)))
(format stream "~%{0,0,~D,0,MAKE_FIXNUM(~D),MAKE_FIXNUM(~D),(cl_objectfn)~A},"
(or narg -1) (second loc) (second fname-loc)
cfun)))
(format stream "~%};~%#endif"))
(loop for (loc fname-loc fun) in (nreverse *global-cfuns-array*)
do (let* ((cfun (fun-cfun fun))
(minarg (fun-minarg fun))
(maxarg (fun-maxarg fun))
(narg (if (= minarg maxarg) maxarg nil)))
(format stream "~%{0,0,~D,0,MAKE_FIXNUM(~D),MAKE_FIXNUM(~D),(cl_objectfn)~A},"
(or narg -1) (second loc) (second fname-loc)
cfun)))
(format stream "~%};")))))
;;; ----------------------------------------------------------------------