/* Debugging extensions for Guile
- * Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2006, 2008 Free Software Foundation
+ * Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2006, 2008, 2009 Free Software Foundation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#include "libguile/root.h"
#include "libguile/fluids.h"
#include "libguile/objects.h"
+#include "libguile/programs.h"
#include "libguile/validate.h"
#include "libguile/debug.h"
#endif
if (scm_is_false (name) && SCM_CLOSUREP (proc))
name = scm_reverse_lookup (SCM_ENV (proc), proc);
+ if (scm_is_false (name) && SCM_PROGRAM_P (proc))
+ name = scm_program_name (proc);
return name;
}
}
if (!SCM_SMOB_DESCRIPTOR (proc).apply)
break;
case scm_tcs_subrs:
-#ifdef CCLO
- case scm_tc7_cclo:
-#endif
procprop:
/* It would indeed be a nice thing if we supplied source even for
built in procedures! */
case scm_tcs_closures:
return SCM_ENV (proc);
case scm_tcs_subrs:
-#ifdef CCLO
- case scm_tc7_cclo:
-#endif
return SCM_EOL;
default:
SCM_WRONG_TYPE_ARG (1, proc);