GithubHelp home page GithubHelp logo

Comments (3)

shirok avatar shirok commented on August 20, 2024

Try

(define-cptr <git-repository> "git_repository*" "Git_RepositoryClass"
  "GIT_REPOP" "GIT_REPO" "GIT_REPO_VALUE"
  (print repo-print)
  (cleanup repo-cleanup))

From: Nguyễn Thái Ngọc Duy [email protected]
Subject: [Gauche] optional arguments in cgen's define-cptr are not effective (#59)
Date: Thu, 30 Apr 2015 07:50:31 -0700

I have a declaration like this

(define-cptr <git-repository> "git_repository*" "Git_RepositoryClass"
  "GIT_REPOP" "GIT_REPO" "GIT_REPO_VALUE"
  :print repo-print
  :cleanup repo-cleanup)

but the generated code is

Git_RepositoryClass = Scm_MakeForeignPointerClass(Scm_CurrentModule(),"<git-repository>", NULL, NULL, 0);

cleanup-proc and print-proc are not passed to that call. Adding #?= at line 1665 in cgen/stub.scm i got

#?="/home/pclouds/opt/gauche/share/gauche-0.9/0.9.5_pre1/lib/gauche/cgen/stub.scm":1665:(assq-ref clauses 'print)
#?-    #f

Reply to this email directly or view it on GitHub:
#59

from gauche.

pclouds avatar pclouds commented on August 20, 2024

That seems to work. Thank you. I mistook it for keyword syntax. define-cptr should probably error out on unrecognized arguments though.

from gauche.

shirok avatar shirok commented on August 20, 2024

That's reasonable.

From: Nguyễn Thái Ngọc Duy [email protected]
Subject: Re: [Gauche] optional arguments in cgen's define-cptr are not effective (#59)
Date: Thu, 30 Apr 2015 16:39:59 -0700

That seems to work. Thank you. I mistook it for keyword syntax. define-cptr should probably error out on unrecognized arguments though.


Reply to this email directly or view it on GitHub:
#59 (comment)

from gauche.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.