bumb api version and add basic readme to example

This commit is contained in:
Robin Appelman 2019-03-18 17:10:12 +01:00
commit 4d469a7e25
2 changed files with 11 additions and 2 deletions

View file

@ -0,0 +1,9 @@
# Example
## Usage
- build with `cargo +nightly build`
- run php with the module and call the defined method
```bash
php -d extension=target/debug/libhelloworld.so -r 'helloworld();'`
```

View file

@ -115,7 +115,7 @@ impl Module {
pub fn new(name: *const c_char, version: *const c_char) -> Module { pub fn new(name: *const c_char, version: *const c_char) -> Module {
Module { Module {
size: mem::size_of::<Module>() as u16, size: mem::size_of::<Module>() as u16,
zend_api: 20151012, zend_api: 20180731,
zend_debug: 0, zend_debug: 0,
zts: 0, zts: 0,
ini_entry: std::ptr::null(), ini_entry: std::ptr::null(),
@ -137,7 +137,7 @@ impl Module {
type_: 0, type_: 0,
handle: std::ptr::null(), handle: std::ptr::null(),
module_number: 0, module_number: 0,
build_id: c_str!("API20151012,NTS"), build_id: c_str!("API20180731,NTS"),
} }
} }