[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] more descriptive error for dynamic-pointer
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] more descriptive error for dynamic-pointer |
Date: |
Thu, 31 Mar 2011 16:32:09 +0200 |
User-agent: |
Gnus/5.110013 (No Gnus v0.13) Emacs/23.3 (gnu/linux) |
Hello,
Mike Gran <address@hidden> writes:
> + const char *lt_err = lt_dlerror ();
> + if (lt_err == (const char *) NULL || strncmp (lt_err, "No Error",
> strlen ("No Error")))
> + {
> + char *msg;
> + int ret;
> + ret = asprintf (&msg, "symbol \"%s\" not found", symb);
> + if (ret != -1)
> + {
> + scm_misc_error (subr, msg, SCM_EOL);
> + free (msg);
> + }
> + else
> + scm_misc_error (subr, "symbol not found", SCM_EOL);
> + }
> + else
> + scm_misc_error (subr, (char *) lt_dlerror (), SCM_EOL);
Two things:
1. the bottom-most ‘scm_misc_error’ call should use ‘lt_err’.
2. ‘asprintf’ is a GNU extension so can’t be used here (unless we use
the right Gnulib module.)
Thanks,
Ludo’.