Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
108 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module Typhon | ||
module Compiler | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module Typhon | ||
module Environment | ||
class Dict | ||
include PythonObjectMixin | ||
|
||
def initialize(hash) | ||
@hash = hash | ||
py_init(DictType) | ||
end | ||
end | ||
|
||
python_class_c :DictType, [ObjectBase], 'dict', 'dict' do | ||
end | ||
end | ||
end | ||
|
||
class Hash | ||
def to_py | ||
Typhon::Environment::Dict.new(self) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module Typhon | ||
module Environment | ||
class List | ||
include PythonObjectMixin | ||
|
||
def initialize(rb_list) | ||
@list = rb_list | ||
py_init(ListType) | ||
end | ||
end | ||
|
||
python_class_c :ListType, [ObjectBase], 'list', 'list' do | ||
end | ||
end | ||
end | ||
|
||
class Array | ||
def to_py | ||
Typhon::Environment::List.new(self) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module Typhon | ||
module Environment | ||
class Tuple | ||
include PythonObjectMixin | ||
|
||
def initialize(rbx_tuple) | ||
@tuple = rbx_tuple | ||
py_init(TupleType) | ||
end | ||
end | ||
|
||
python_class_c :TupleType, [ObjectBase], 'tuple', 'tuple' do | ||
|
||
end | ||
end | ||
end | ||
|
||
class Rubinius::Tuple | ||
def to_py | ||
Typhon::Environment::Tuple.new(self) | ||
end | ||
end | ||
|