[svn:parrot] r36339 - trunk/src/pmc

allison at svn.parrot.org allison at svn.parrot.org
Tue Feb 3 21:44:07 UTC 2009


Author: allison
Date: Tue Feb  3 21:44:06 2009
New Revision: 36339
URL: https://trac.parrot.org/parrot/changeset/36339

Log:
[strings] Use the new sane-logic 'Parrot_str_equal' in the Task PMC (as an example).

Modified:
   trunk/src/pmc/task.pmc

Modified: trunk/src/pmc/task.pmc
==============================================================================
--- trunk/src/pmc/task.pmc	Tue Feb  3 21:21:53 2009	(r36338)
+++ trunk/src/pmc/task.pmc	Tue Feb  3 21:44:06 2009	(r36339)
@@ -211,27 +211,27 @@
         Parrot_Task_attributes * const core_struct = PARROT_TASK(SELF);
         PMC *value;
 
-        if (Parrot_str_not_equal(interp, name, CONST_STRING(interp, "id")) == 0) {
+        if (Parrot_str_equal(interp, name, CONST_STRING(interp, "id"))) {
             value = pmc_new(interp, enum_class_Integer);
             VTABLE_set_integer_native(interp, value, core_struct->id);
         }
-        else if (Parrot_str_not_equal(interp, name, CONST_STRING(interp, "type")) == 0) {
+        else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "type"))) {
             value = pmc_new(interp, enum_class_String);
             VTABLE_set_string_native(interp, value, core_struct->type);
         }
-        else if (Parrot_str_not_equal(interp, name, CONST_STRING(interp, "subtype")) == 0) {
+        else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "subtype"))) {
             value = pmc_new(interp, enum_class_String);
             VTABLE_set_string_native(interp, value, core_struct->subtype);
         }
-        else if (Parrot_str_not_equal(interp, name, CONST_STRING(interp, "priority")) == 0) {
+        else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "priority"))) {
             value = pmc_new(interp, enum_class_Integer);
             VTABLE_set_integer_native(interp, value, core_struct->priority);
         }
-        else if (Parrot_str_not_equal(interp, name, CONST_STRING(interp, "status")) == 0) {
+        else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "status"))) {
             value = pmc_new(interp, enum_class_String);
             VTABLE_set_string_native(interp, value, core_struct->status);
         }
-        else if (Parrot_str_not_equal(interp, name, CONST_STRING(interp, "birthtime")) == 0) {
+        else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "birthtime"))) {
             value = pmc_new(interp, enum_class_Float);
             VTABLE_set_number_native(interp, value, core_struct->birthtime);
         }
@@ -254,28 +254,28 @@
     VTABLE void set_attr_str(STRING *name, PMC *value) {
         Parrot_Task_attributes * const core_struct = PARROT_TASK(SELF);
 
-        if (Parrot_str_not_equal(interp, name, CONST_STRING(interp, "id")) == 0) {
+        if (Parrot_str_equal(interp, name, CONST_STRING(interp, "id"))) {
             core_struct->id = VTABLE_get_integer(interp, value);
         }
-        else if (Parrot_str_not_equal(interp, name, CONST_STRING(interp, "type")) == 0) {
+        else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "type"))) {
             core_struct->type = VTABLE_get_string(interp, value);
         }
-        else if (Parrot_str_not_equal(interp, name, CONST_STRING(interp, "subtype")) == 0) {
+        else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "subtype"))) {
             core_struct->subtype = VTABLE_get_string(interp, value);
         }
-        else if (Parrot_str_not_equal(interp, name, CONST_STRING(interp, "priority")) == 0) {
+        else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "priority"))) {
             core_struct->priority = VTABLE_get_integer(interp, value);
         }
-        else if (Parrot_str_not_equal(interp, name, CONST_STRING(interp, "status")) == 0) {
+        else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "status"))) {
             core_struct->status = VTABLE_get_string(interp, value);
         }
-        else if (Parrot_str_not_equal(interp, name, CONST_STRING(interp, "birthtime")) == 0) {
+        else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "birthtime"))) {
             core_struct->birthtime = VTABLE_get_number(interp, value);
         }
-        else if (Parrot_str_not_equal(interp, name, CONST_STRING(interp, "code")) == 0) {
+        else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "code"))) {
             core_struct->codeblock = value;
         }
-        else if (Parrot_str_not_equal(interp, name, CONST_STRING(interp, "data")) == 0) {
+        else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "data"))) {
             core_struct->data = value;
         }
     }


More information about the parrot-commits mailing list