From: <wda...@us...> - 2008-08-28 21:53:32
|
Revision: 3110 http://oorexx.svn.sourceforge.net/oorexx/?rev=3110&view=rev Author: wdashley Date: 2008-08-28 21:53:42 +0000 (Thu, 28 Aug 2008) Log Message: ----------- ArtifactID: None Comment: Fixed and optimized the RexxArrayObject uses. Modified Paths: -------------- incubator/RexxGTK/4x/grxentry.cpp incubator/RexxGTK/4x/grxevents.cpp incubator/RexxGTK/4x/grxlabel.cpp incubator/RexxGTK/4x/grxnotebook.cpp incubator/RexxGTK/4x/grxtextview.cpp incubator/RexxGTK/4x/grxwidget.cpp Modified: incubator/RexxGTK/4x/grxentry.cpp =================================================================== --- incubator/RexxGTK/4x/grxentry.cpp 2008-08-28 21:39:57 UTC (rev 3109) +++ incubator/RexxGTK/4x/grxentry.cpp 2008-08-28 21:53:42 UTC (rev 3110) @@ -141,10 +141,9 @@ cbcb *cblock = (cbcb *)data; RexxObjectPtr rxobj = (RexxObjectPtr)g_object_get_data(G_OBJECT(window), "OORXOBJECT"); RexxThreadContext *context; - RexxArrayObject arr; + RexxArrayObject arr = context->NewArray(1); cblock->instance->AttachThread(&context); - arr = context->NewArray(1); RexxObjectPtr rxstep = context->NumberToObject((wholenumber_t)step);; context->ArrayPut(arr, rxstep, 1); RexxObjectPtr rxarg2 = context->NumberToObject((wholenumber_t)arg2);; Modified: incubator/RexxGTK/4x/grxevents.cpp =================================================================== --- incubator/RexxGTK/4x/grxevents.cpp 2008-08-28 21:39:57 UTC (rev 3109) +++ incubator/RexxGTK/4x/grxevents.cpp 2008-08-28 21:53:42 UTC (rev 3110) @@ -922,7 +922,7 @@ context->NumberToObject((wholenumber_t)event->message_type)); context->SendMessage1(rxevent, "data_format=", context->NumberToObject((wholenumber_t)event->data_format)); - RexxArrayObject temparr = context->NewArray(20); + RexxArrayObject temparr = context->NewArray(1); if (event->data_format == 8) { for (int i = 0; i < 20; i++) { context->ArrayPut(temparr, Modified: incubator/RexxGTK/4x/grxlabel.cpp =================================================================== --- incubator/RexxGTK/4x/grxlabel.cpp 2008-08-28 21:39:57 UTC (rev 3109) +++ incubator/RexxGTK/4x/grxlabel.cpp 2008-08-28 21:53:42 UTC (rev 3110) @@ -94,10 +94,9 @@ cbcb *cblock = (cbcb *)data; RexxObjectPtr rxobj = (RexxObjectPtr)g_object_get_data(G_OBJECT(window), "OORXOBJECT"); RexxThreadContext *context; - RexxArrayObject arr; + RexxArrayObject arr = context->NewArray(1); cblock->instance->AttachThread(&context); - arr = context->NewArray(1); RexxObjectPtr rxstep = context->NumberToObject((wholenumber_t)arg1);; context->ArrayPut(arr, rxstep, 1); RexxObjectPtr rxarg2 = context->NumberToObject((wholenumber_t)arg2);; Modified: incubator/RexxGTK/4x/grxnotebook.cpp =================================================================== --- incubator/RexxGTK/4x/grxnotebook.cpp 2008-08-28 21:39:57 UTC (rev 3109) +++ incubator/RexxGTK/4x/grxnotebook.cpp 2008-08-28 21:53:42 UTC (rev 3110) @@ -130,10 +130,9 @@ cbcb *cblock = (cbcb *)data; RexxObjectPtr rxobj = (RexxObjectPtr)g_object_get_data(G_OBJECT(window), "OORXOBJECT"); RexxThreadContext *context; - RexxArrayObject arr; + RexxArrayObject arr = context->NewArray(1); cblock->instance->AttachThread(&context); - arr = context->NewArray(1); RexxObjectPtr rxwidget = (RexxObjectPtr)g_object_get_data(G_OBJECT(widget), "OORXOBJECT"); context->ArrayPut(arr, rxwidget, 1); RexxObjectPtr rxarg2 = context->NumberToObject((wholenumber_t)arg2);; Modified: incubator/RexxGTK/4x/grxtextview.cpp =================================================================== --- incubator/RexxGTK/4x/grxtextview.cpp 2008-08-28 21:39:57 UTC (rev 3109) +++ incubator/RexxGTK/4x/grxtextview.cpp 2008-08-28 21:53:42 UTC (rev 3110) @@ -157,10 +157,9 @@ cbcb *cblock = (cbcb *)data; RexxObjectPtr rxobj = (RexxObjectPtr)g_object_get_data(G_OBJECT(window), "OORXOBJECT"); RexxThreadContext *context; - RexxArrayObject arr; + RexxArrayObject arr = context->NewArray(1); cblock->instance->AttachThread(&context); - arr = context->NewArray(1); RexxObjectPtr rxstep = context->NumberToObject((wholenumber_t)arg1);; context->ArrayPut(arr, rxstep, 1); RexxObjectPtr rxarg2 = context->NumberToObject((wholenumber_t)arg2);; Modified: incubator/RexxGTK/4x/grxwidget.cpp =================================================================== --- incubator/RexxGTK/4x/grxwidget.cpp 2008-08-28 21:39:57 UTC (rev 3109) +++ incubator/RexxGTK/4x/grxwidget.cpp 2008-08-28 21:53:42 UTC (rev 3110) @@ -860,8 +860,7 @@ RexxObjectPtr entry; GList *list = gtk_menu_get_for_attach_widget(GTK_WIDGET(self)); - RexxArrayObject arr = context->NewArray(g_list_length(list)); - list = g_list_first(list); + RexxArrayObject arr = context->NewArray(1); int i = 0; while (list != NULL) { i++; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |