*** empty log message ***

This commit is contained in:
hyung-hwan 2005-06-30 15:11:00 +00:00
parent baaacef33a
commit 046c748151
4 changed files with 12 additions and 14 deletions

View File

@ -1,5 +1,5 @@
/* /*
* $Id: class.c,v 1.11 2005-06-30 12:07:02 bacon Exp $ * $Id: class.c,v 1.12 2005-06-30 15:11:00 bacon Exp $
*/ */
#include <xp/stx/class.h> #include <xp/stx/class.h>
@ -72,7 +72,6 @@ int xp_stx_get_instance_variable_index (
if (class_obj->header.class == stx->class_metaclass) { if (class_obj->header.class == stx->class_metaclass) {
/* metaclass */ /* metaclass */
/* TODO: can a metaclas have instance variables? */ /* TODO: can a metaclas have instance variables? */
*index = index_super; *index = index_super;
} }
else { else {
@ -88,17 +87,18 @@ int xp_stx_get_instance_variable_index (
} }
} }
*index = size + index_super; *index = size + index_super;
*/ */
if (class_obj->variables != stx->nil) {
if (class_obj->variables == stx->nil) *index = 0;
else {
string = XP_STX_CHAR_OBJECT(stx, class_obj->variables); string = XP_STX_CHAR_OBJECT(stx, class_obj->variables);
if (xp_stx_strword (string->data, name, index) != XP_NULL) { if (xp_stx_strword (string->data, name, index) != XP_NULL) {
*index += index_super; *index += index_super;
return 0; return 0;
} }
*index = size + index_super;
} }
else *index = index_super;
*index += index_super;
} }
return -1; return -1;

View File

@ -1,5 +1,5 @@
/* /*
* $Id: misc.c,v 1.5 2005-06-30 12:07:02 bacon Exp $ * $Id: misc.c,v 1.6 2005-06-30 15:11:00 bacon Exp $
*/ */
#include <xp/stx/misc.h> #include <xp/stx/misc.h>
@ -37,8 +37,7 @@ xp_word_t xp_stx_strxhash (const xp_char_t* str, xp_word_t len)
} }
xp_char_t* xp_stx_strword ( xp_char_t* xp_stx_strword (
const xp_char_t* str, const xp_char_t* word, const xp_char_t* str, const xp_char_t* word, xp_word_t* word_index)
xp_word_t* word_index, xp_word_t* word_count)
{ {
xp_char_t* p = (xp_char_t*)str; xp_char_t* p = (xp_char_t*)str;
xp_char_t* tok; xp_char_t* tok;
@ -55,6 +54,6 @@ xp_char_t* xp_stx_strword (
index++; index++;
} }
*word_count = index; *word_index = index;
return XP_NULL; return XP_NULL;
} }

View File

@ -1,5 +1,5 @@
/* /*
* $Id: misc.h,v 1.8 2005-06-30 12:07:02 bacon Exp $ * $Id: misc.h,v 1.9 2005-06-30 15:11:00 bacon Exp $
*/ */
#ifndef _XP_STX_MISC_H_ #ifndef _XP_STX_MISC_H_
@ -42,8 +42,7 @@ xp_word_t xp_stx_strhash (const xp_char_t* str);
xp_word_t xp_stx_strxhash (const xp_char_t* str, xp_word_t len); xp_word_t xp_stx_strxhash (const xp_char_t* str, xp_word_t len);
xp_char_t* xp_stx_strword ( xp_char_t* xp_stx_strword (
const xp_char_t* str, const xp_char_t* word, const xp_char_t* str, const xp_char_t* word, xp_word_t* word_index);
xp_word_t* word_index, xp_word_t* word_count);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -8,7 +8,7 @@ perform: method with: x with: y with: z with: a with: b with: c
a := #xxx niceMethod. a := #xxx niceMethod.
" "
b := -30 xxx nil this. b := -30 xxx nil this.
name := 10. instanceClass := 10.
(jjj xxx: 10 xy) zzz: (10 fuck: 20 you: 40) yyy: kkk. (jjj xxx: 10 xy) zzz: (10 fuck: 20 you: 40) yyy: kkk.
[ spec plus: 20] [ spec plus: 20]