Skip to content

Commit

Permalink
Add simplistic TclArray
Browse files Browse the repository at this point in the history
  • Loading branch information
coke committed Apr 14, 2010
1 parent 4b11aab commit fd74fd9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions build/Makefile.in
Expand Up @@ -39,6 +39,7 @@ GEN_SOURCES = \
src/Partcl/commands/package.pir \
src/Partcl/commands/string.pir \
src/Partcl/commands/trace.pir \
src/TclArray.pir \
src/TclLexPad.pir \
src/TclList.pir \
src/TclString.pir \
Expand Down
1 change: 1 addition & 0 deletions src/Partcl.pir
Expand Up @@ -28,6 +28,7 @@
.include 'src/Partcl/commands/package.pir'
.include 'src/Partcl/commands/string.pir'
.include 'src/Partcl/commands/trace.pir'
.include 'src/TclArray.pir'
.include 'src/TclLexPad.pir'
.include 'src/TclList.pir'
.include 'src/TclString.pir'
Expand Down
17 changes: 17 additions & 0 deletions src/TclArray.pm
@@ -0,0 +1,17 @@
class TclArray is Hash {

INIT {
my $tcl_type := P6metaclass().get_parrotclass('TclArray');
my $core_type := P6metaclass().get_parrotclass('Hash', :hll<parrot>);

my $interp := pir::getinterp__p();
$interp.hll_map($core_type, $tcl_type);
}

method __dump($dumper, $label) {
$dumper.genericHash( $label, self );
}

}

# vim: filetype=perl6:

0 comments on commit fd74fd9

Please sign in to comment.