Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix misuse of FBOUNDP #27

Closed
wants to merge 5 commits into from
Closed

Conversation

shamazmazum
Copy link
Contributor

Hello.

This patch fixes misuse of FBOUNDP which is used to determine if a slot is existing and bound in the object, but only can be used to check if a symbol is bound to a function. The incorrect use makes codex unusable.

Also, there is a possibility that I missed something and there are more places in src/macro.lisp where unbound slots can be accessed. But I checked with my libraries which use codex for documentation and all works fine.

And also, It can be good idea to refactor your code and avoid use of SLOT-EXISTS-P and SLOT-BOUNDP completely using a generic function for collecting rows for the table and specific methods for each node class like so:

(defgeneric collect-rows (node)
    (:method-combination append))
(defmethod collect-rows append ((node class-node))
    (list (make-row ...)
           (make-row ...)))
(defmethod collect-rows append ((node struct-node))
    (list (make-row ...)
           (make-row ...)))
;; etc

@eudoxia0
Copy link
Member

How strange. I thought I knew how it worked. Would you kindly split the PR up? There's other changes e.g. to the CSS. Also I don't want to change the build status flag.

@shamazmazum shamazmazum mentioned this pull request Jun 14, 2023
@shamazmazum
Copy link
Contributor Author

Sorry, I forgot to create a separate branch. Done in #32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants