[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
can gh_run_hook return value??
From: |
M.P.Anand Babu |
Subject: |
can gh_run_hook return value?? |
Date: |
Wed, 4 Jul 2001 03:37:59 +0530 (IST) |
SCM gh_run_hook (SCM hook, SCM args)
^ is this the value returned by hook ?
I tried returning a list from a hook and
when i do a gh_list_p on the returned
SCM object, it says not a list :(
===================================================
here is the hook procedure returning a list with "from"
and "message"
;; [reveice hook section starts]
(add-hook! gy-msg-receive-hook (lambda (from msg)
(define history-file (open-file
"/root/.gnuyahoo/history" "a"))
(define log (string-append from " -> " msg
"\n"))
(display log history-file)
(close-output-port history-file)
(list from msg)))
;; [reveice hook section ends]
===================================================
Here is the c code.
If I run a gh_list_p on hook_return, it returns false !!
SCM hook_return;
hook_return = scm_run_hook (get_gy_msg_receive_hook (),
gh_list (gh_str02scm (pkt->msg_id),
gh_str02scm (pkt->msg), SCM_UNDEFINED));
if (gh_list_p (hook_return))
{
this fails, gh_list_p(...) returns false)
}
================================================
please help
-ab
--
Addicted to GNU Emacs
Inspired by GNU (www.gnu.org)
- can gh_run_hook return value??,
M.P.Anand Babu <=