Mercurial > hg > xemacs-beta
comparison src/data.c @ 4846:a98ca4640147
clean up object print methods
casetab.c, console.c, data.c, database.c, device-msw.c, device.c, eval.c, file-coding.c, frame.c, glyphs.c, gui.c, keymap.c, lisp.h, mule-charset.c, objects.c, print.c, process.c, tooltalk.c, ui-gtk.c, window.c:
New function printing_unreadable_lcrecord(). Automatically
prints the type name and pointer value of the object. Use it
instead of printing_unreadable_object(); make that latter
function local to print.c.
window.c: During creation, window may have Qt as its buffer. Don't
crash if trying to print such a window.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Wed, 13 Jan 2010 05:49:13 -0600 |
parents | aa5ed11f473b |
children | 6772ce4d982b 19a72041c5ed |
comparison
equal
deleted
inserted
replaced
4845:a3c673c0720b | 4846:a98ca4640147 |
---|---|
2590 static void | 2590 static void |
2591 print_weak_list (Lisp_Object obj, Lisp_Object printcharfun, | 2591 print_weak_list (Lisp_Object obj, Lisp_Object printcharfun, |
2592 int UNUSED (escapeflag)) | 2592 int UNUSED (escapeflag)) |
2593 { | 2593 { |
2594 if (print_readably) | 2594 if (print_readably) |
2595 printing_unreadable_object ("#<weak-list>"); | 2595 printing_unreadable_lcrecord (obj, 0); |
2596 | 2596 |
2597 write_fmt_string_lisp (printcharfun, "#<weak-list %s %S>", 2, | 2597 write_fmt_string_lisp (printcharfun, "#<weak-list %s %S>", 2, |
2598 encode_weak_list_type (XWEAK_LIST (obj)->type), | 2598 encode_weak_list_type (XWEAK_LIST (obj)->type), |
2599 XWEAK_LIST (obj)->list); | 2599 XWEAK_LIST (obj)->list); |
2600 } | 2600 } |
3065 { | 3065 { |
3066 return Qnil; | 3066 return Qnil; |
3067 } | 3067 } |
3068 | 3068 |
3069 static void | 3069 static void |
3070 print_weak_box (Lisp_Object UNUSED (obj), Lisp_Object printcharfun, | 3070 print_weak_box (Lisp_Object obj, Lisp_Object printcharfun, |
3071 int UNUSED (escapeflag)) | 3071 int UNUSED (escapeflag)) |
3072 { | 3072 { |
3073 if (print_readably) | 3073 if (print_readably) |
3074 printing_unreadable_object ("#<weak_box>"); | 3074 printing_unreadable_lcrecord (obj, 0); |
3075 write_fmt_string (printcharfun, "#<weak_box>"); | 3075 write_fmt_string (printcharfun, "#<weak-box>"); /* #### fix */ |
3076 } | 3076 } |
3077 | 3077 |
3078 static int | 3078 static int |
3079 weak_box_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) | 3079 weak_box_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) |
3080 { | 3080 { |
3291 { | 3291 { |
3292 return Qnil; | 3292 return Qnil; |
3293 } | 3293 } |
3294 | 3294 |
3295 static void | 3295 static void |
3296 print_ephemeron (Lisp_Object UNUSED (obj), Lisp_Object printcharfun, | 3296 print_ephemeron (Lisp_Object obj, Lisp_Object printcharfun, |
3297 int UNUSED (escapeflag)) | 3297 int UNUSED (escapeflag)) |
3298 { | 3298 { |
3299 if (print_readably) | 3299 if (print_readably) |
3300 printing_unreadable_object ("#<ephemeron>"); | 3300 printing_unreadable_lcrecord (obj, 0); |
3301 write_fmt_string (printcharfun, "#<ephemeron>"); | 3301 write_fmt_string (printcharfun, "#<ephemeron>"); /* #### fix */ |
3302 } | 3302 } |
3303 | 3303 |
3304 static int | 3304 static int |
3305 ephemeron_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) | 3305 ephemeron_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) |
3306 { | 3306 { |