| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 53 | public static function fromCData( |
||
| 54 | string $type, |
||
| 55 | CData $c_pointer, |
||
| 56 | ): self { |
||
| 57 | /** @var CInteger $addr */ |
||
| 58 | $addr = \FFI::cast('long', $c_pointer); |
||
| 59 | $ctype = \FFI::typeof($c_pointer)->getPointerType(); |
||
| 60 | return new self( |
||
| 61 | $type, |
||
| 62 | $addr->cdata, |
||
| 63 | \FFI::sizeof($ctype), |
||
| 64 | ); |
||
| 67 |