chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] using constants from define-foreign-enum-type via a modu


From: Martin DeMello
Subject: [Chicken-users] using constants from define-foreign-enum-type via a module
Date: Tue, 27 Jul 2010 00:57:03 +0530

Here's some code I'm using to test various module features (attached,
and at http://github.com/martindemello/test-chicken-modules)

In cprog-binding.scm, I define a binding to a C enum via:

(define-foreign-enum-type (ccount int)
                          (ccount->int int->ccount)
                          (c:zero ZERO)
                          (c:one ONE)
                          (c:two TWO)
                          (c:three THREE))

This works if I (include "cprog-binding") directly in a scheme file
(see "direct-load.scm"). However, if I want to include it in a module,
then import the module, I cannot access the enum constants, though I
can access ccount->int and int->ccount (see "test.scm"). What's the
right way to do this?

martin

Attachment: test-chicken-modules.tgz
Description: GNU Zip compressed data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]