8000 Support clr.GetClrType() - as in IronPython by vivainio · Pull Request #433 · pythonnet/pythonnet · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clr.GetClrType - added xml doc comment, updated AUTHORS.md and CHANGE…
…LOG.md
  • Loading branch information
vivainio committed Mar 22, 2017
commit 8feacd8355f3387f6657acb80ccd77f49ed2f80b
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
- Sam Winstanley ([@swinstanley](https://github.com/swinstanley))
- Sean Freitag ([@cowboygneox](https://github.com/cowboygneox))
- Serge Weinstock ([@sweinst](https://github.com/sweinst))
- Ville M. Vainio ([@vivainio](https://github.com/vivainio))
- Virgil Dupras ([@hsoft](https://github.com/hsoft))
- Wenguang Yang ([@yagweb](https://github.com/yagweb))
- Xavier Dupré ([@sdpython](https://github.com/sdpython))
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
## [unreleased][]

### Added

- Added clr.GetClrType (#432)(#433)
- Added `Foo` feature

### Changed
Expand Down
8 changes: 8 additions & 0 deletions src/runtime/moduleobject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,14 @@ public static Assembly AddReference(string name)
return assembly;
}

/// <summary>
/// Get a Type instance for a class object.
/// clr.GetClrType(IComparable) gives you the Type for IComparable,
/// that you can e.g. perform reflection on. Similar to typeof(IComparable) in C#
/// or clr.GetClrType(IComparable) in IronPython
/// </summary>
/// <param name="type"></param>
/// <returns>The Type object</returns>
[ModuleFunction]
[ForbidPythonThreads]
public static Type GetClrType(object type)
Expand Down
0