home *** CD-ROM | disk | FTP | other *** search
/ Really Useful CD 1 / ReallyUsefulCD1.iso / extras / languages / smalltalk / _smalltalk / sources / h / string < prev    next >
Encoding:
Text File  |  1987-12-30  |  777 b   |  28 lines

  1. /*
  2.      Little Smalltalk string definitions
  3. */
  4. /*
  5.      for strings s_size = STRINGSIZE
  6.  
  7.      Unlike other special objects (integers, floats, etc), strings
  8.      must keep their own super_obj pointer, since the class
  9.      ArrayedCollection (a super class of String) contains instance
  10.      variables, and thus each instance of String must have a unique
  11.      super_obj.
  12. */
  13.  
  14. struct string_struct {
  15.      int  s_ref_count;
  16.      int  s_size;
  17.      object    *s_super_obj;
  18.      char *s_value;
  19.      } ;
  20.  
  21. typedef struct string_struct string;
  22.  
  23. extern object *new_str();          /* make a new string object */
  24. extern string *new_istr();         /* internal form of new string */
  25. extern char   *walloc();      /* allocate a copy a word */
  26.  
  27. # define string_value(x) (((string *) x)->s_value)
  28.