[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Re: sock_get_string_buf
From: |
Waldek Hebisch |
Subject: |
Re: [Axiom-developer] Re: sock_get_string_buf |
Date: |
Fri, 3 Nov 2006 21:10:59 +0100 (CET) |
Gabriel Dos Reis wrote:
> I would like to see the final patch, e.g. the things that would be
> committed, including the explanation of what the code and what is
> going in the pamphletss.
>
diff -ru build-improvements.bb/src/interp/ChangeLog.build-improvements
build-improvements/src/interp/ChangeLog.build-improvements
--- build-improvements.bb/src/interp/ChangeLog.build-improvements
2006-11-03 18:07:12.000000000 +0100
+++ build-improvements/src/interp/ChangeLog.build-improvements 2006-11-03
21:00:59.000000000 +0100
@@ -1,3 +1,9 @@
+2006-11-03 Waldek Hebisch <address@hidden>
+
+ * sockio.lisp.pamphlet (sock_get_string_buf_wrapper): new
+ function
+ (sock_get_string_buf): call it
+
2006-10-31 Gabriel Dos Reis <address@hidden>
* Makefile.pamphlet: Make extracted Boot .PRECIOUS.
diff -ru build-improvements.bb/src/interp/sockio.lisp.pamphlet
build-improvements/src/interp/sockio.lisp.pamphlet
--- build-improvements.bb/src/interp/sockio.lisp.pamphlet 2006-11-03
18:07:12.000000000 +0100
+++ build-improvements/src/interp/sockio.lisp.pamphlet 2006-11-03
18:27:31.000000000 +0100
@@ -73,10 +73,20 @@
(progn
(clines "extern double plus_infinity(), minus_infinity(), NANQ();")
(clines "extern double sock_get_float();")
+;; GCL may pass strings by value. 'sock_get_string_buf' should fill
+;; string with data read from connection, therefore needs address of
+;; actual string buffer. We use 'sock_get_string_buf_wrapper' to
+;; resolve the problem
+ (clines "int sock_get_string_buf_wrapper(int i, object x, int j)"
+ "{ if (type_of(x)!=t_string) FEwrong_type_argument(sLstring,x);"
+ " if (x->st.st_fillp<j)"
+ " FEerror(\"string too small in sock_get_string_buf_wrapper\",0);"
+ " return sock_get_string_buf(i, x->st.st_self, j); }")
(defentry open_server (string) (int "open_server"))
(defentry sock_get_int (int) (int "sock_get_int"))
(defentry sock_send_int (int int) (int "sock_send_int"))
- (defentry sock_get_string_buf (int string int) (int "sock_get_string_buf"))
+ (defentry sock_get_string_buf (int object int)
+ (int "sock_get_string_buf_wrapper"))
(defentry sock_send_string_len (int string int) (int "sock_send_string_len"))
(defentry sock_get_float (int) (double "sock_get_float"))
(defentry sock_send_float (int double) (int "sock_send_float"))
--
Waldek Hebisch
address@hidden
- [Axiom-developer] sock_get_string_buf, Waldek Hebisch, 2006/11/01
- [Axiom-developer] Re: sock_get_string_buf, Camm Maguire, 2006/11/01
- [Axiom-developer] Re: sock_get_string_buf, Camm Maguire, 2006/11/01
- Re: [Axiom-developer] Re: sock_get_string_buf, root, 2006/11/01
- Re: [Axiom-developer] Re: sock_get_string_buf, root, 2006/11/01
- Re: [Axiom-developer] Re: sock_get_string_buf, Camm Maguire, 2006/11/02
- Re: [Axiom-developer] Re: sock_get_string_buf, root, 2006/11/01
- Re: [Axiom-developer] Re: sock_get_string_buf, Alfredo Portes, 2006/11/01
- Re: [Axiom-developer] Re: sock_get_string_buf, Alfredo Portes, 2006/11/01
- Re: [Axiom-developer] Re: sock_get_string_buf, root, 2006/11/02
- RE: [Axiom-developer] Re: sock_get_string_buf, Bill Page, 2006/11/02