- Introduce LibraryExportedNative class with #[Native] attribute - Add LibraryHiddenNative class with #[NoExport] and #[Native] attributes - Create stub file for native class definitions - Implement StubNativePoint class with native annotation and basic properties - Add length method to StubNativePoint for geometric calculations - Enable compiler support for native class annotationsmaster
parent
2471ed1db7
commit
00420215b3
3 changed files with 30 additions and 0 deletions
@ -0,0 +1,7 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
#[Native] |
||||||
|
final class LibraryExportedNative |
||||||
|
{ |
||||||
|
public int $value = 0; |
||||||
|
} |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
#[NoExport] |
||||||
|
#[Native] |
||||||
|
final class LibraryHiddenNative |
||||||
|
{ |
||||||
|
public int $value = 0; |
||||||
|
} |
||||||
|
|
||||||
|
function library_visible_value(): int |
||||||
|
{ |
||||||
|
return 42; |
||||||
|
} |
||||||
@ -0,0 +1,10 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
#[Native] |
||||||
|
final class StubNativePoint |
||||||
|
{ |
||||||
|
public float $x = 0.0; |
||||||
|
public float $y = 0.0; |
||||||
|
|
||||||
|
public function length(): float {} |
||||||
|
} |
||||||
Loading…
Reference in new issue