summaryrefslogtreecommitdiff
path: root/src/print.c
diff options
context:
space:
mode:
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 ();
}