Raymond Toy pushed to branch issue-312-motif-server at cmucl / cmucl
Commits: 2c4e223e by Raymond Toy at 2024-05-10T15:00:29-07:00 Declare type_writer to have a void* arg instead of caddr_t.
Update datatrans.h so that message_write_float is declared to have a second arg of type void*. Then update implementation of message_write_float to have a matching function signature and cast the void* arg to float* so we can get the float value.
- - - - -
3 changed files:
- src/motif/server/datatrans.c - src/motif/server/datatrans.h - src/motif/server/tables.h
Changes:
===================================== src/motif/server/datatrans.c ===================================== @@ -265,10 +265,12 @@ void message_write_color(message_t m,XColor *color,int tag) message_put_word(m,color->blue); }
-void message_write_float(message_t m,float *f,int tag) +void message_write_float(message_t m,void *f,int tag) { + float *fl = (float *) f; + message_put_dblword(m,combine_type_and_data(tag,0)); - message_put_dblword(m,*f); + message_put_dblword(m,*fl); }
===================================== src/motif/server/datatrans.h ===================================== @@ -38,7 +38,7 @@ extern void message_write_int_list(); extern void message_write_event(); extern void message_write_color(); /* GCC complains without the full prototype */ -extern void message_write_float(message_t,float*,int); +extern void message_write_float(message_t,void*,int);
===================================== src/motif/server/tables.h ===================================== @@ -10,8 +10,8 @@ #ifndef TABLES_H #define TABLES_H
-typedef void (*type_writer)(message_t out,caddr_t src,int type_tag); -typedef void (*type_reader)(message_t in,caddr_t dest,int type_tag,int data); +typedef void (*type_writer)(message_t out,void *src,int type_tag); +typedef void (*type_reader)(message_t in,void *dest,int type_tag,int data);
typedef struct { String type;
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/2c4e223e3a53f79e3c147a46...