[uim-commit] r1011 - branches/r5rs/sigscheme
tkng at freedesktop.org
tkng at freedesktop.org
Sat Jul 23 20:08:32 EST 2005
Author: tkng
Date: 2005-07-23 03:08:29 -0700 (Sat, 23 Jul 2005)
New Revision: 1011
Modified:
branches/r5rs/sigscheme/datas.c
Log:
* sigscheme/datas.c:
- (Scm_Intern): If name is already interned, do not copy.
Modified: branches/r5rs/sigscheme/datas.c
===================================================================
--- branches/r5rs/sigscheme/datas.c 2005-07-23 10:05:04 UTC (rev 1010)
+++ branches/r5rs/sigscheme/datas.c 2005-07-23 10:08:29 UTC (rev 1011)
@@ -744,11 +744,8 @@
ScmObj sym = SCM_NIL;
ScmObj list = SCM_NIL;
ScmObj sym_list = symbol_hash[n];
- char *symname = (char*)malloc(strlen(name) + 1);
+ char *symname;
- /* copy string */
- strcpy(symname, name);
-
/* Search Symbol by name */
list = sym_list;
for (; !SCM_NULLP(list); list = SCM_CDR(list)) {
@@ -760,6 +757,8 @@
}
/* If not in the sym_list, allocate new Symbol */
+ symname = (char*)malloc(strlen(name) + 1);
+ strcpy(symname, name);
sym = Scm_NewSymbol(symname, SCM_UNBOUND);
/* And Append it to the head of symbol_hash */
More information about the uim-commit
mailing list