Merge pull request #187 from kngwyu/pyobject-macros

Modify pyobject_native_type to take typeobject as expr
This commit is contained in:
konstin 2018-07-02 09:43:15 +02:00 committed by GitHub
commit 4169b03178
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,7 +92,7 @@ macro_rules! pyobject_native_type_named(
#[macro_export]
macro_rules! pyobject_native_type(
($name: ident, $typeobject: path, $checkfunction: path) => {
($name: ident, $typeobject: expr, $checkfunction: path) => {
pyobject_native_type_named!($name);
pyobject_native_type_convert!($name, $typeobject, $checkfunction);
pyobject_downcast!($name, $checkfunction);
@ -107,7 +107,7 @@ macro_rules! pyobject_native_type(
#[macro_export]
macro_rules! pyobject_native_type_convert(
($name: ident, $typeobject: path, $checkfunction: path) => {
($name: ident, $typeobject: expr, $checkfunction: path) => {
impl $crate::typeob::PyTypeInfo for $name {
type Type = ();
type BaseType = $crate::PyObjectRef;