[plt-scheme] getting struct type from within extension

From: Millaway, John (John_Millaway at ghrsystems.com)
Date: Tue Apr 13 22:53:57 EDT 2004

Hi,

How does one get a scheme struct type from within an extension procedure?
For example, in the scheme code, I have

(make-struct foo (x y z))

and in the extension code, I want to verify that a parameter is an instance
of type 'struct:foo'...

Scheme_Object * function_of_foo (int argc, Scheme_Object ** argv) {
    if (! scheme_is_struct_instance( WHAT_HERE?,  argv[0])){
        scheme_wrong_type(...);
    }
    ...
}


Thanks! -John



Posted on the users mailing list.