/[gcl]/gcl/h/object.h
ViewVC logotype

Diff of /gcl/h/object.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.46 by camm, Sat Sep 24 19:27:23 2005 UTC revision 1.47 by camm, Thu Sep 29 17:57:27 2005 UTC
# Line 444  struct string {           /*  string hea Line 444  struct string {           /*  string hea
444  #define stack_string(a_,b_) struct string _s={0};\  #define stack_string(a_,b_) struct string _s={0};\
445                              object a_=(object)&_s;\                              object a_=(object)&_s;\
446                              set_type_of((a_),t_string);\                              set_type_of((a_),t_string);\
447                              (a_)->st.st_self=(b_);\                              (a_)->st.st_self=(void *)(b_);\
448                              (a_)->st.st_dim=(a_)->st.st_fillp=strlen(b_);                              (a_)->st.st_dim=(a_)->st.st_fillp=strlen(b_)
449    
450    #define stack_fixnum(a_,b_) struct fixnum_struct _s={0};\
451                                object a_;\
452                                if (is_imm_fix(b_)) (a_)=make_fixnum(b_); else {\
453                                (a_)=(object)&_s;\
454                                set_type_of((a_),t_fixnum);\
455                                (a_)->FIX.FIXVAL=(b_);}
456    
457  #define TYPE_ERROR(a_,b_) {stack_string(tp_err,"~S is not of type ~S.");\  #define TYPE_ERROR(a_,b_) {stack_string(tp_err,"~S is not of type ~S.");\
458                             Icall_error_handler(sKwrong_type_argument,tp_err,2,(a_),(b_));}                             Icall_error_handler(sKwrong_type_argument,tp_err,2,(a_),(b_));}
459    
460  #define CONTROL_ERROR(a_) {stack_string(tp_err,#a_);\  #define CONTROL_ERROR(a_) {stack_string(tp_err,a_);\
461                             Icall_error_handler(sKcontrol_error,tp_err,0);}                             Icall_error_handler(sKcontrol_error,tp_err,0);}
462    
463    #define NERROR(a_)  {stack_string(fmt,a_ ": line ~a, file ~a, function ~a");\
464                        {stack_fixnum(line,__LINE__);\
465                        {stack_string(file,__FILE__);\
466                        {stack_string(function,__FUNCTION__);\
467                         Icall_error_handler(sKerror,fmt,3,line,file,function);}}}}
468    
469    #define ASSERT(a_) if (!(a_)) NERROR("The assertion " #a_ " failed")
470    
471  struct ustring {  struct ustring {
472    
473    FIRSTWORD;    FIRSTWORD;

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.47

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26