mirror of
https://github.com/icewind1991/ivory.git
synced 2026-06-03 18:54:07 +02:00
bumb api version and add basic readme to example
This commit is contained in:
parent
6163651511
commit
4d469a7e25
2 changed files with 11 additions and 2 deletions
9
examples/helloworld/README.md
Normal file
9
examples/helloworld/README.md
Normal 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();'`
|
||||||
|
```
|
||||||
|
|
@ -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"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue