File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ repository = "https://github.com/davidcole1340/ext-php-rs"
5
5
homepage = " https://github.com/davidcole1340/ext-php-rs"
6
6
license = " MIT OR Apache-2.0"
7
7
keywords = [" php" , " ffi" , " zend" ]
8
- version = " 0.11.2 "
8
+ version = " 0.12.0 "
9
9
authors = [
" David Cole <[email protected] >" ]
10
10
edition = " 2018"
11
11
categories = [" api-bindings" ]
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ impl Zval {
95
95
if self . is_double ( ) {
96
96
Some ( unsafe { self . value . dval } )
97
97
} else {
98
- self . long ( ) . map ( |x| x as f64 )
98
+ None
99
99
}
100
100
}
101
101
@@ -114,17 +114,10 @@ impl Zval {
114
114
115
115
/// Returns the value of the zval if it is a string.
116
116
///
117
- /// If the zval does not contain a string, the function will check if it
118
- /// contains a double or a long, and if so it will convert the value to
119
- /// a [`String`] and return it. Don't rely on this logic, as there is
120
- /// potential for this to change to match the output of the [`str()`]
121
- /// function.
122
- ///
123
117
/// [`str()`]: #method.str
124
118
pub fn string ( & self ) -> Option < String > {
125
119
self . str ( )
126
120
. map ( |s| s. to_string ( ) )
127
- . or_else ( || self . double ( ) . map ( |x| x. to_string ( ) ) )
128
121
}
129
122
130
123
/// Returns the value of the zval if it is a string.
You can’t perform that action at this time.
0 commit comments