X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Falloc.c;h=b01489cc2a8ba5f7949b4a1bbf367928d4dab138;hb=f2025090f01da2850dd72008074d6b8dc33c0113;hp=79026036ce13e9680e9e0ff0d12a374e9953f870;hpb=976b002b16336930724ae22476014583ad022e7d;p=chise%2Fxemacs-chise.git diff --git a/src/alloc.c b/src/alloc.c index 7902603..b01489c 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -58,8 +58,6 @@ Boston, MA 02111-1307, USA. */ #include "sysfile.h" #include "window.h" -#include - #ifdef DOUG_LEA_MALLOC #include #endif @@ -176,10 +174,6 @@ extern /* Non-zero means we're in the process of doing the dump */ int purify_flag; -#ifdef HEAP_IN_DATA -extern void sheap_adjust_h(); -#endif - #ifdef ERROR_CHECK_TYPECHECK Error_behavior ERROR_ME, ERROR_ME_NOT, ERROR_ME_WARN; @@ -971,6 +965,11 @@ cons_equal (Lisp_Object ob1, Lisp_Object ob2, int depth) return 0; } +static const struct lrecord_description cons_description[] = { + { XD_LISP_OBJECT, offsetof(struct Lisp_Cons, car), 2 }, + { XD_END } +}; + DEFINE_BASIC_LRECORD_IMPLEMENTATION ("cons", cons, mark_cons, print_cons, 0, cons_equal, @@ -980,6 +979,7 @@ DEFINE_BASIC_LRECORD_IMPLEMENTATION ("cons", cons, * handle conses. */ 0, + cons_description, struct Lisp_Cons); DEFUN ("cons", Fcons, 2, 2, 0, /* @@ -1170,6 +1170,11 @@ vector_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) return 1; } +static const struct lrecord_description vector_description[] = { + { XD_LONG, offsetof(struct Lisp_Vector, size) }, + { XD_LISP_OBJECT, offsetof(struct Lisp_Vector, contents), XD_INDIRECT(0) } +}; + DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION("vector", vector, mark_vector, print_vector, 0, vector_equal, @@ -1179,6 +1184,7 @@ DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION("vector", vector, * knows how to handle vectors. */ 0, + vector_description, size_vector, Lisp_Vector); /* #### should allocate `small' vectors from a frob-block */ @@ -1747,6 +1753,12 @@ string_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) !memcmp (XSTRING_DATA (obj1), XSTRING_DATA (obj2), len)); } +static const struct lrecord_description string_description[] = { + { XD_STRING_DATA, offsetof(Lisp_String, data) }, + { XD_LISP_OBJECT, offsetof(Lisp_String, plist), 1 }, + { XD_END } +}; + DEFINE_BASIC_LRECORD_IMPLEMENTATION ("string", string, mark_string, print_string, /* @@ -1760,6 +1772,7 @@ DEFINE_BASIC_LRECORD_IMPLEMENTATION ("string", string, * SWEEP_FIXED_TYPE_BLOCK(). */ 0, string_equal, 0, + string_description, struct Lisp_String); /* String blocks contain this many useful bytes. */ @@ -2074,6 +2087,10 @@ LENGTH must be an integer and INIT must be a character. Bufbyte *init_ptr = init_str; switch (len) { +#ifdef UTF2000 + case 6: *ptr++ = *init_ptr++; + case 5: *ptr++ = *init_ptr++; +#endif case 4: *ptr++ = *init_ptr++; case 3: *ptr++ = *init_ptr++; case 2: *ptr++ = *init_ptr++; @@ -2247,7 +2264,7 @@ mark_lcrecord_list (Lisp_Object obj, void (*markobj) (Lisp_Object)) DEFINE_LRECORD_IMPLEMENTATION ("lcrecord-list", lcrecord_list, mark_lcrecord_list, internal_object_printer, - 0, 0, 0, struct lcrecord_list); + 0, 0, 0, 0, struct lcrecord_list); Lisp_Object make_lcrecord_list (size_t size, CONST struct lrecord_implementation *implementation)