klisp

an open source interpreter for the Kernel Programming Language.
git clone http://git.hanabi.in/repos/klisp.git
Log | Files | Refs | README

commit de984620fa9039982d6e397dd2be0d6fbb2cd653
parent aae7efec701a76e62417f75db95c0aa5c66055ed
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Thu, 12 Apr 2012 18:04:16 -0300

Changed void * to klisp_CFunction in operative and continuation definition.  Fixed typo in libraries section of the manual.

Diffstat:
Mdoc/html/Libraries.html | 2+-
Mdoc/klisp.info | 2+-
Mdoc/src/libraries.texi | 2+-
Msrc/kobject.h | 11+++++++++--
Msrc/kstate.h | 6------
5 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/doc/html/Libraries.html b/doc/html/Libraries.html @@ -154,7 +154,7 @@ registered. <code>exports</code> should be a list of <code>(#:export <p>A lone symbol has the same semantics as the pair with that symbol in both internal and external positions. No symbol can appear more than once as external. -<code>body</code> should be an acyclic list of expressions. <code>exports</code> +<code>body</code> should be an acyclic list of expressions. <code>imports</code> should be a list like <code>(&lt;import-spec&gt; ...)</code> where <code>&lt;import-spec&gt;</code> is either <ul> diff --git a/doc/klisp.info b/doc/klisp.info @@ -3438,7 +3438,7 @@ things (first class status, exposing of the library register, etc). A lone symbol has the same semantics as the pair with that symbol in both internal and external positions. No symbol can appear more than once as external. `body' should be an acyclic list of - expressions. `exports' should be a list like `(<import-spec> + expressions. `imports' should be a list like `(<import-spec> ...)' where `<import-spec>' is either * `<name>' diff --git a/doc/src/libraries.texi b/doc/src/libraries.texi @@ -121,7 +121,7 @@ registered. @code{exports} should be a list of @code{(#:export A lone symbol has the same semantics as the pair with that symbol in both internal and external positions. No symbol can appear more than once as external. -@code{body} should be an acyclic list of expressions. @code{exports} +@code{body} should be an acyclic list of expressions. @code{imports} should be a list like @code{(<import-spec> ...)} where @code{<import-spec>} is either @itemize @bullet diff --git a/src/kobject.h b/src/kobject.h @@ -42,6 +42,13 @@ typedef union GCObject GCObject; /* +** prototype for underlying c functions of continuations & +** operatives +*/ +struct klisp_State; /* later defined in kstate.h */ +typedef void (*klisp_CFunction) (struct klisp_State *K); + +/* ** Common Header for all collectible objects (in macro form, to be ** included in other objects) */ @@ -429,14 +436,14 @@ typedef struct __attribute__ ((__packed__)) { TValue mark; /* for guarding continuation */ TValue parent; /* may be () for root continuation */ TValue comb; /* combiner that created the cont (or #inert) */ - void *fn; /* the function that does the work */ + klisp_CFunction fn; /* the function that does the work */ int32_t extra_size; TValue extra[]; } Continuation; typedef struct __attribute__ ((__packed__)) { CommonHeader; - void *fn; /* the function that does the work */ + klisp_CFunction fn; /* the function that does the work */ int32_t extra_size; TValue extra[]; } Operative; diff --git a/src/kstate.h b/src/kstate.h @@ -21,12 +21,6 @@ #include "ktoken.h" #include "kmem.h" -/* -** prototype for underlying c functions of continuations & -** operatives -*/ -typedef void (*klisp_CFunction) (klisp_State *K); - /* XXX: for now, lines and column names are fixints */ /* MAYBE: this should be in tokenizer */ typedef struct {