[plt-scheme] Xcode sample app
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.
Thanks,
Mike
// 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,
MZCONFIG_OUTPUT_PORT);
int i;
for (i = 1; i < argc; i++)
{
if (scheme_setjmp(scheme_error_buf))
{
return -1; /* There was an error */
}
else
{
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. */
--table->count;
break;
}
} 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>