summaryrefslogtreecommitdiff
path: root/src/print.c
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2022-01-11 21:57:54 +0000
committerAlan Mackenzie <acm@muc.de>2022-01-11 21:57:54 +0000
commit2128cd8c08da84ab40608ac5db0fecfce733cfad (patch)
treee295275b1a99aed2e5e0cc270f91614062c670f6 /src/print.c
parent4e77177b063f9da8a48709aa3ef416d0ac21837b (diff)
parent18dac472553e6cd1102b644c2175012e12215c18 (diff)
downloademacs-2128cd8c08da84ab40608ac5db0fecfce733cfad.tar.gz
Merge branch 'master' into scratch/correct-warning-pos
Diffstat (limited to 'src/print.c')
-rw-r--r--src/print.c37
1 files changed, 29 insertions, 8 deletions
diff --git a/src/print.c b/src/print.c
index eb0fe591b85..dae60190a33 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1,6 +1,6 @@
/* Lisp object printing and output streams.
-Copyright (C) 1985-1986, 1988, 1993-1995, 1997-2021 Free Software
+Copyright (C) 1985-1986, 1988, 1993-1995, 1997-2022 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
@@ -1548,16 +1548,21 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag,
case PVEC_XWIDGET:
#ifdef HAVE_XWIDGETS
{
+ if (NILP (XXWIDGET (obj)->buffer))
+ print_c_string ("#<killed xwidget>", printcharfun);
+ else
+ {
#ifdef USE_GTK
- int len = sprintf (buf, "#<xwidget %u %p>",
- XXWIDGET (obj)->xwidget_id,
- XXWIDGET (obj)->widget_osr);
+ int len = sprintf (buf, "#<xwidget %u %p>",
+ XXWIDGET (obj)->xwidget_id,
+ XXWIDGET (obj)->widget_osr);
#else
- int len = sprintf (buf, "#<xwidget %u %p>",
- XXWIDGET (obj)->xwidget_id,
- XXWIDGET (obj)->xwWidget);
+ int len = sprintf (buf, "#<xwidget %u %p>",
+ XXWIDGET (obj)->xwidget_id,
+ XXWIDGET (obj)->xwWidget);
#endif
- strout (buf, len, len, printcharfun);
+ strout (buf, len, len, printcharfun);
+ }
break;
}
#else
@@ -1899,6 +1904,22 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag,
}
break;
#endif
+ case PVEC_SQLITE:
+ {
+ print_c_string ("#<sqlite ", printcharfun);
+ int i = sprintf (buf, "db=%p", XSQLITE (obj)->db);
+ strout (buf, i, i, printcharfun);
+ if (XSQLITE (obj)->is_statement)
+ {
+ i = sprintf (buf, " stmt=%p", XSQLITE (obj)->stmt);
+ strout (buf, i, i, printcharfun);
+ }
+ i = sprintf (buf, " name=%s", XSQLITE (obj)->name);
+ strout (buf, i, i, printcharfun);
+ printchar ('>', printcharfun);
+ }
+ break;
+
default:
emacs_abort ();
}