[plt-scheme] Xcode sample app

From: Michael Larson (mklarson at mac.com)
Date: Thu Feb 24 18:03:17 EST 2005

Is there a sample OS X application that is linked to mzscheme? I built 
the latest CVS and release builds but I am getting crashes just 
creating a scheme env. Maybe there is a build setting I am missing, I 
tried both gcc3.3 and gcc4 which made no diff. I really don't want to 
debug the build or mzscheme I just want use it.



// main.cpp.

#include "scheme.h"

int main(int argc, char *argv[])
         Scheme_Env              *e = scheme_basic_env(); 
<-------------------crashes in here
         Scheme_Config   *scheme_config = scheme_current_config();
         Scheme_Object   *curout = scheme_get_param(scheme_config, 
         int i;

         for (i = 1; i < argc; i++)
                 if (scheme_setjmp(scheme_error_buf))
                         return -1; /* There was an error */
                   Scheme_Object *v = scheme_eval_string(argv[i], e);
                   scheme_display(v, curout);
                   scheme_display(scheme_make_character('\n'), curout);
         return 0;

in symbol.c
/* Special hashing for symbols: */
static Scheme_Object *symbol_bucket(Scheme_Hash_Table *table,
                     GC_CAN_IGNORE const char *key, unsigned int length,
                     Scheme_Object *naya)


   if (!h2)
     h2 = 2;
   else if (h2 & 0x1)
     h2++; /* note: table size is never even, so no % needed */
   while ((bucket = table->keys[WEAK_ARRAY_HEADSIZE + h])) { <-------- 
table == NULL
     if (SAME_OBJ(bucket, SYMTAB_LOST_CELL)) {
       if (naya) {
     /* We're re-using, so decrement count and it will be
        re-incremented. */
     } else if (((int)length == SCHEME_SYM_LEN(bucket))
            && !memcmp(key, SCHEME_SYM_VAL(bucket), length))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20050224/37d527ea/attachment.html>

Posted on the users mailing list.