[librep] Revert "ABI-incompatible change!" The commit was not wrong, but it is better to split it and re-comm
- From: Christopher Bratusek <chrisb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librep] Revert "ABI-incompatible change!" The commit was not wrong, but it is better to split it and re-comm
- Date: Sat, 11 Sep 2010 11:44:22 +0000 (UTC)
commit 6908c5b64c7335b2e67707a97d9fca8f3e73de69
Author: Teika kazura <teika lavabit com>
Date: Tue Sep 7 09:49:41 2010 +0900
Revert "ABI-incompatible change!"
The commit was not wrong, but it is better to split it and re-commit
as several distinct commits.
This reverts commit d83b5890cc9f1ba1b0c86f56c57827a7bb9e1cde.
lisp/rep/lang/doc.jl | 16 ++++------------
lisp/rep/vm/compiler/rep.jl | 15 +--------------
src/rep_lisp.h | 7 ++-----
src/structures.c | 1 -
src/symbols.c | 27 +--------------------------
5 files changed, 8 insertions(+), 58 deletions(-)
---
diff --git a/lisp/rep/lang/doc.jl b/lisp/rep/lang/doc.jl
index 6bb4a31..193a17c 100644
--- a/lisp/rep/lang/doc.jl
+++ b/lisp/rep/lang/doc.jl
@@ -142,19 +142,11 @@ NAME is true, then it should be the symbol that is associated with VALUE."
'documentation))
(defun documentation (symbol #!optional structure value)
- "Returns the documentation-string for SYMBOL which should be the name
-of one of a special variable, function, macro, or a special form.
-If it's not a variable, then VALUE should be the function etc.
-
-STRUCTURE is a compatibility argument, and can be nil."
+ "Returns the documentation-string for SYMBOL."
(catch 'exit
- (when (and (not structure) value)
- (let (tem)
- (if (closurep value)
- (setq tem (closure-structure value))
- (if (subrp value) ;; t for subr and special form
- (setq tem (subr-structure value))))
- (when (and tem (structure-name tem))
+ (when (and (not structure) (closurep value))
+ (let ((tem (closure-structure value)))
+ (when (structure-name tem)
(setq structure (structure-name tem)))))
;; First check for in-core documentation
diff --git a/lisp/rep/vm/compiler/rep.jl b/lisp/rep/vm/compiler/rep.jl
index 15c8b92..4d7a49a 100644
--- a/lisp/rep/vm/compiler/rep.jl
+++ b/lisp/rep/vm/compiler/rep.jl
@@ -107,20 +107,7 @@
(memq (car out) top-level-compiled))))))
(case (car form)
((defun)
- (remember-function (nth 1 form) (nth 2 form) (nthcdr 3 form))
- (let* ((body (cdddr form))
- (doc (car body))
- prop-name)
- (when (and (not *compiler-write-docs*)
- (stringp doc))
- (setq prop-name
- (intern
- (concat "documentation#"
- (symbol-name (fluid current-module)))))
- (format standard-error "prop-name: %s\n" prop-name)
- (setq form
- `(progn (put ',(cadr form) ',prop-name ,doc)
- ,form)))))
+ (remember-function (nth 1 form) (nth 2 form) (nthcdr 3 form)))
((defmacro)
(remember-function (nth 1 form) (nth 2 form))
diff --git a/src/rep_lisp.h b/src/rep_lisp.h
index b687c2e..33fb8c5 100644
--- a/src/rep_lisp.h
+++ b/src/rep_lisp.h
@@ -564,7 +564,6 @@ typedef struct {
} fun;
repv name;
repv int_spec;
- repv structure;
} rep_subr;
typedef struct {
@@ -572,7 +571,6 @@ typedef struct {
repv (*fun)();
repv name;
repv int_spec; /* put this in plist? */
- repv structure;
} rep_xsubr;
/* If set in rep_SubrN types, it'll be passed a vector of args,
@@ -777,7 +775,7 @@ typedef struct rep_gc_n_roots {
extern repv fsym args; \
rep_ALIGN_CELL(rep_xsubr ssym) = { type, (repv (*)()) fsym, \
rep_VAL(&rep_CONCAT(ssym, __name)), \
- rep_NULL, rep_NULL }; \
+ rep_NULL }; \
repv fsym args
/* Same as above but with an extra arg -- an interactive-spec string. */
@@ -787,8 +785,7 @@ typedef struct rep_gc_n_roots {
extern repv fsym args; \
rep_ALIGN_CELL(rep_xsubr ssym) = { type, (repv (*)()) fsym, \
rep_VAL(&rep_CONCAT(ssym, __name)), \
- rep_VAL(&rep_CONCAT(ssym, __int)), \
- rep_NULL}; \
+ rep_VAL(&rep_CONCAT(ssym, __int)) };\
repv fsym args
/* Add a subroutine */
diff --git a/src/structures.c b/src/structures.c
index 6631df6..c4d83f4 100644
--- a/src/structures.c
+++ b/src/structures.c
@@ -1542,7 +1542,6 @@ rep_add_subr(rep_xsubr *subr, rep_bool export)
rep_struct_node *n = lookup_or_add (s, sym);
n->binding = rep_VAL (subr);
n->is_exported = export;
- subr->structure = rep_structure;
}
return sym;
}
diff --git a/src/symbols.c b/src/symbols.c
index ad9eea7..9b879d2 100644
--- a/src/symbols.c
+++ b/src/symbols.c
@@ -417,7 +417,7 @@ Set the function value in the closure FUNARG to FUNCTION.
DEFUN("closure-structure", Fclosure_structure,
Sclosure_structure, (repv funarg), rep_Subr1) /*
::doc:rep.structures#closure-function::
-closure-structure FUNARG
+closure-function FUNARG
Return the structure associated with the closure FUNARG.
::end:: */
@@ -426,30 +426,6 @@ Return the structure associated with the closure FUNARG.
return rep_FUNARG(funarg)->structure;
}
-DEFUN("subr-structure", Fsubr_structure,
- Ssubr_structure, (repv arg), rep_Subr1) /*
-::doc:rep.structures#closure-function::
-subr-structure SUBR
-
-Return the structure associated with the subr SUBR.
-::end:: */
-{
- /* Simple rep_DECLARE1 can't be used. Borrow rep_DECLARE1 macro
- definition. */
- do{
- if(Fsubrp(arg) == Qnil){
- rep_signal_arg_error(arg, 1);
- return rep_NULL;
- }
- }while(0);
-
- if(rep_XSUBR(arg)->structure != rep_NULL){
- return rep_XSUBR(arg)->structure;
- }else{
- return Qnil;
- }
-}
-
DEFUN ("set-closure-structure", Fset_closure_structure,
Sset_closure_structure, (repv closure, repv structure), rep_Subr2)
{
@@ -1518,7 +1494,6 @@ rep_symbols_init(void)
rep_ADD_SUBR(Sset_closure_function);
rep_ADD_SUBR(Sclosure_name);
rep_ADD_SUBR(Sclosurep);
- rep_ADD_SUBR(Ssubr_structure);
rep_pop_structure (tem);
tem = rep_push_structure ("rep.structures");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]