Skip to content

Commit d149cfe

Browse files
committed
Explain in comments why static argument mapping exists (because it is a good design but I wanted to replace it).
1 parent 29cb9ae commit d149cfe

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

base.c

+1
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ ctr_object* ctr_object_case_do( ctr_object* myself, ctr_argument* argumentList )
425425
* ✎ write: y, stop.
426426
*/
427427
ctr_object* ctr_object_message( ctr_object* myself, ctr_argument* argumentList ) {
428+
//@important! we use a List because message+arguments would exceed argument limit!
428429
ctr_object* message = ctr_internal_cast2string( argumentList->object );
429430
ctr_object* arr = argumentList->next->object;
430431
if ( arr->info.type != CTR_OBJECT_TYPE_OTARRAY ) {

world.c

+1
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,7 @@ ctr_object* ctr_send_message(ctr_object* receiverObject, char* message, long vle
11051105
mesgArgument = (ctr_argument*) ctr_heap_allocate( sizeof( ctr_argument ) );
11061106
mesgArgument->object = ctr_build_string(message, vlen);
11071107
mesgArgument->next = argumentList;
1108+
//@important! static argument signatures because this is direct 1-to-1 map on actual methods! Don't be tempted to change to list!
11081109
if (argCount == 0 || argCount > 3) {
11091110
returnValue = ctr_send_message(receiverObject, CTR_DICT_RESPOND_TO, strlen(CTR_DICT_RESPOND_TO), mesgArgument);
11101111
} else if (argCount == 1) {

0 commit comments

Comments
 (0)