mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 19:50:24 +02:00
* smob.c (scm_smob_print): Handle non-existing type name nicely.
Removed #include "genio.h"
This commit is contained in:
parent
f12733c9d4
commit
2c16a78a11
2 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,6 @@
|
|||
#include "_scm.h"
|
||||
|
||||
#include "objects.h"
|
||||
#include "genio.h"
|
||||
|
||||
#ifdef HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
|
@ -114,7 +113,7 @@ scm_smob_print (SCM exp, SCM port, scm_print_state *pstate)
|
|||
{
|
||||
int n = SCM_SMOBNUM (exp);
|
||||
scm_puts ("#<", port);
|
||||
scm_puts (SCM_SMOBNAME (n), port);
|
||||
scm_puts (SCM_SMOBNAME (n) ? SCM_SMOBNAME (n) : "smob", port);
|
||||
scm_putc (' ', port);
|
||||
scm_intprint (scm_smobs[n].size ? SCM_CDR (exp) : exp, 16, port);
|
||||
scm_putc ('>', port);
|
||||
|
|
|
@ -89,6 +89,7 @@ do { \
|
|||
#define SCM_SET_SMOB_DATA(x, data) SCM_SETCDR (x, data)
|
||||
#define SCM_TC2SMOBNUM(x) (0x0ff & ((x) >> 8))
|
||||
#define SCM_SMOBNUM(x) (SCM_TC2SMOBNUM (SCM_CAR (x)))
|
||||
/* SCM_SMOBNAME can be 0 if name is missing */
|
||||
#define SCM_SMOBNAME(smobnum) scm_smobs[smobnum].name
|
||||
|
||||
extern int scm_numsmob;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue