[svn:parrot] r46821 - in branches/ucs4_encoding: include/parrot src/ops

darbelo at svn.parrot.org darbelo at svn.parrot.org
Thu May 20 18:12:32 UTC 2010


Author: darbelo
Date: Thu May 20 18:12:32 2010
New Revision: 46821
URL: https://trac.parrot.org/parrot/changeset/46821

Log:
Add charset and encoding options to the stringinfo opcode.

Modified:
   branches/ucs4_encoding/include/parrot/string.h
   branches/ucs4_encoding/src/ops/string.ops

Modified: branches/ucs4_encoding/include/parrot/string.h
==============================================================================
--- branches/ucs4_encoding/include/parrot/string.h	Thu May 20 17:22:03 2010	(r46820)
+++ branches/ucs4_encoding/include/parrot/string.h	Thu May 20 18:12:32 2010	(r46821)
@@ -51,6 +51,8 @@
 #define STRINGINFO_FLAGS    4
 #define STRINGINFO_BUFUSED  5
 #define STRINGINFO_STRLEN   6
+#define STRINGINFO_ENCODING 7
+#define STRINGINFO_CHARSET  8
 
 /* &end_gen */
 

Modified: branches/ucs4_encoding/src/ops/string.ops
==============================================================================
--- branches/ucs4_encoding/src/ops/string.ops	Thu May 20 17:22:03 2010	(r46820)
+++ branches/ucs4_encoding/src/ops/string.ops	Thu May 20 18:12:32 2010	(r46821)
@@ -379,6 +379,12 @@
           case STRINGINFO_STRLEN:
             $1 = $2->strlen;
             break;
+          case STRINGINFO_CHARSET:
+            $1 = $2->charset;
+            break;
+          case STRINGINFO_ENCODING:
+            $1 = $2->encoding;
+            break;
           default:
             {
                 opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,


More information about the parrot-commits mailing list