Permalink
Browse files

Merge branch 'rurban/json-utf16-gh845' of github.com:parrot/parrot in…

…to rurban/json-utf16-gh845
  • Loading branch information...
2 parents 274df5d + 2079a97 commit 16e4251d043ab612d416f416d6f01c4c87b48660 @rurban rurban committed Oct 1, 2012
Showing with 34 additions and 11 deletions.
  1. +8 −0 .travis.yml
  2. +2 −0 ChangeLog
  3. +3 −1 MANIFEST
  4. +2 −0 docs/binaries/parrot.pod
  5. +3 −2 src/io/api.c
  6. +6 −5 src/platform/generic/cpu_type.c
  7. +10 −3 tools/dev/gdb-pp.py
View
@@ -41,3 +41,11 @@ env:
- PARROT_CONFIG_ARGS="" PARROT_OPTIMIZE="--optimize" PARROT_TEST="smoke" CC="gcc"
- PARROT_CONFIG_ARGS="--without-gettext --without-gmp --without-libffi --without-extra-nci-thunks --without-opengl --without-readline --without-pcre --without-zlib --without-threads --without-icu" PARROT_OPTIMIZE="" PARROT_TEST="smoke" CC="gcc"
- PARROT_CONFIG_ARGS="" PARROT_OPTIMIZE="" PARROT_TEST="smoke" CC="g++"
+
+# Use clang to run our coding standard and manifest tests, because it is the fastest
+# These will cause Travis to report a build failure when somebody breaks the manifest
+# tests by forgetting to add files to our manifest, or when they break our coding standards.
+# The reason we do not use smolder_fulltest is becuase it will intermittently trigger
+# the Travis CI time-out of 15 minutes
+ - PARROT_CONFIG_ARGS="" PARROT_OPTIMIZE="" PARROT_TEST="codingstd_tests" CC="clang"
+ - PARROT_CONFIG_ARGS="" PARROT_OPTIMIZE="" PARROT_TEST="manifest_tests" CC="clang"
View
@@ -8,6 +8,8 @@
+ Preload Configure steps when called with perl -d Configure.pl [GH #833]
+ Strip unneeded config keys from installed config hash. Saves 6360
bytes from every installed executable. [GH #824]
+ + Parrot_get_cpu_type returns now "unknown" for all unknown cpu types.
+ On non-windows it returned before 4.9.0 a null string. [GH #846]
- Build
+ Improved warnings for clang. [GH #843]
+ Cleaned wrong UNUSED(arg) macros in all pmc's due to an improved
View
@@ -119,9 +119,9 @@ compilers/tge/TGE/Rule.pir [tge]
compilers/tge/TGE/Tree.pir [tge]
compilers/tge/tgc.pir [tge]
config/README.pod []doc
-config/auto/arch.pm []
config/auto/alignof.pm []
config/auto/alignof/test_c.in []
+config/auto/arch.pm []
config/auto/attributes.pm []
config/auto/attributes/test_c.in []
config/auto/backtrace.pm []
@@ -518,6 +518,8 @@ examples/benchmarks/stress2.rb [examples]
examples/benchmarks/stress3.pasm [examples]
examples/benchmarks/stress_integers.pir [examples]
examples/benchmarks/stress_strings.pir [examples]
+examples/benchmarks/stress_strings1.pir [examples]
+examples/benchmarks/stress_stringsu.pir [examples]
examples/benchmarks/vpm.pir [examples]
examples/benchmarks/vpm.pl [examples]
examples/benchmarks/vpm.py [examples]
@@ -1,3 +1,5 @@
+# Copyright (C) 2011-2012, Parrot Foundation.
+
=pod
=head1 NAME
View
@@ -76,8 +76,8 @@ Parrot_io_init(PARROT_INTERP)
os_handle = Parrot_io_internal_std_os_handle(interp, PIO_STDOUT_FILENO);
handle = Parrot_io_fdopen_flags(interp, PMCNULL, os_handle, PIO_F_WRITE);
- Parrot_io_buffer_add_to_handle(interp, handle, IO_PTR_IDX_WRITE_BUFFER, BUFFER_SIZE_ANY,
- PIO_BF_LINEBUF);
+ /* Parrot_io_buffer_add_to_handle(interp, handle, IO_PTR_IDX_WRITE_BUFFER, BUFFER_SIZE_ANY,
+ PIO_BF_LINEBUF); */
_PIO_STDOUT(interp) = handle;
os_handle = Parrot_io_internal_std_os_handle(interp, PIO_STDERR_FILENO);
@@ -952,6 +952,7 @@ Parrot_io_readline_s(PARROT_INTERP, ARGMOD(PMC *handle), ARGIN(STRING * terminat
const IO_VTABLE * const vtable = IO_GET_VTABLE(interp, handle);
IO_BUFFER * read_buffer = IO_GET_READ_BUFFER(interp, handle);
IO_BUFFER * const write_buffer = IO_GET_WRITE_BUFFER(interp, handle);
+ INTVAL flags = Parrot_io_get_flags(interp, handle);
size_t bytes_read;
STRING *result;
size_t max_delimiter_byte_size = 0;
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011, Parrot Foundation.
+ * Copyright (C) 2011-2012, Parrot Foundation.
*/
/*
@@ -33,15 +33,16 @@ For win32, look in platform/win32/cpu_type.c
=item C<STRING * Parrot_get_cpu_type(Parrot_Interp interp)>
-Fetch CPU type for non-win32 systems
-For win32, look in platform/win32/misc.c
+Fetch CPU type for non-win32 systems.
+For win32, look in platform/win32/cpu_type.c
=back
=cut
*/
+PARROT_CANNOT_RETURN_NULL
STRING *
Parrot_get_cpu_type(Parrot_Interp interp) {
struct utsname uname_info;
@@ -51,10 +52,10 @@ Parrot_get_cpu_type(Parrot_Interp interp) {
uname(&uname_info);
proc_arch = uname_info.machine;
#else
- *proc_arch = '\0';
+ proc_arch ="unknown";
#endif
return Parrot_str_new_init(interp, proc_arch, strlen(proc_arch),
- Parrot_ascii_encoding_ptr, 0);
+ Parrot_ascii_encoding_ptr, 0);
}
View
@@ -1,4 +1,4 @@
-# Copyright (C) 2011, Parrot Foundation.
+# Copyright (C) 2011-2012, Parrot Foundation.
from gdb.printing import PrettyPrinter, SubPrettyPrinter
import gdb.types
import gdb
@@ -155,6 +155,13 @@ def _parrot_str_to_str(val):
"""
encoding = val['encoding'].dereference()
encoding_name = encoding['name'].string()
- length = val['strlen']
-
+ length = val['bufused']
+
+ # See http://docs.python.org/library/codecs.html#standard-encodings
+ if encoding_name == 'binary':
+ encoding_name='raw_unicode_escape'
+ if encoding_name == 'ucs2':
+ encoding_name='utf_16'
+ if encoding_name == 'ucs4':
+ encoding_name=='utf_32'
return val['strstart'].string(encoding=encoding_name,length=length)

0 comments on commit 16e4251

Please sign in to comment.