[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [modules] Possible return values of the env->type_of?
From: |
Eli Zaretskii |
Subject: |
Re: [modules] Possible return values of the env->type_of? |
Date: |
Fri, 22 Jun 2018 21:10:18 +0300 |
> From: Kaushal Modi <kaushal.modi@gmail.com>
> Date: Fri, 22 Jun 2018 10:41:35 -0400
>
> (should (eq 'cons (modtest-get-type '(1 2 3)))) ;Interestingly, this is a
> "cons" too.
> (should (eq 'cons (modtest-get-type (list 1 2 3))))) ;.. and this too!
>
> Below code[3] is in Nim that creates that Elisp modtest-get-type function;
> it's a light wrapper that calls the type_of Modules API function:
>
> emacs.defun(get_type, 1):
> ## Returns the Emacs-Lisp symbol of the argument type.
> env.type_of(env, args[0])
>
> Is this expected? I was expecting the type symbol returned for the last two
> tests above to be 'list.
There's no such type as 'list', it's just a cons cell with a special
cdr.