mirror of
https://github.com/icewind1991/ivory.git
synced 2026-06-03 18:54:07 +02:00
simplify zvaltype creation
This commit is contained in:
parent
d9e7a104ce
commit
736b800ae0
1 changed files with 5 additions and 36 deletions
|
|
@ -361,43 +361,12 @@ impl<K: Into<ArrayKey> + Hash + Eq + Ord, T: Into<PhpVal>> From<HashMap<K, T>> f
|
||||||
|
|
||||||
impl From<ZValType> for _zval_struct__bindgen_ty_1 {
|
impl From<ZValType> for _zval_struct__bindgen_ty_1 {
|
||||||
fn from(ty: ZValType) -> Self {
|
fn from(ty: ZValType) -> Self {
|
||||||
match ty {
|
_zval_struct__bindgen_ty_1 {
|
||||||
ZValType::Long => _zval_struct__bindgen_ty_1 {
|
|
||||||
v: _zval_struct__bindgen_ty_1__bindgen_ty_1 {
|
v: _zval_struct__bindgen_ty_1__bindgen_ty_1 {
|
||||||
type_: ZValType::Long as zend_uchar,
|
type_: ty as zend_uchar,
|
||||||
type_flags: 0,
|
type_flags: 0,
|
||||||
u: _zval_struct__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { extra: 0 },
|
u: _zval_struct__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { extra: 0 },
|
||||||
},
|
},
|
||||||
},
|
|
||||||
ZValType::Double => _zval_struct__bindgen_ty_1 {
|
|
||||||
v: _zval_struct__bindgen_ty_1__bindgen_ty_1 {
|
|
||||||
type_: ZValType::Double as zend_uchar,
|
|
||||||
type_flags: 0,
|
|
||||||
u: _zval_struct__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { extra: 0 },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
ZValType::Undef => _zval_struct__bindgen_ty_1 {
|
|
||||||
v: _zval_struct__bindgen_ty_1__bindgen_ty_1 {
|
|
||||||
type_: ZValType::Undef as zend_uchar,
|
|
||||||
type_flags: 0,
|
|
||||||
u: _zval_struct__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { extra: 0 },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
ZValType::Null => _zval_struct__bindgen_ty_1 {
|
|
||||||
v: _zval_struct__bindgen_ty_1__bindgen_ty_1 {
|
|
||||||
type_: ZValType::Null as zend_uchar,
|
|
||||||
type_flags: 0,
|
|
||||||
u: _zval_struct__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { extra: 0 },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
ZValType::String => _zval_struct__bindgen_ty_1 {
|
|
||||||
v: _zval_struct__bindgen_ty_1__bindgen_ty_1 {
|
|
||||||
type_: ZValType::String as zend_uchar,
|
|
||||||
type_flags: 0,
|
|
||||||
u: _zval_struct__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { extra: 0 },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
_ => unimplemented!(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue