Skip to content

Commit 4693919

Browse files
committed
wip
1 parent 17f094d commit 4693919

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

ext/bcmath/bcmath.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,7 @@ static zend_object *bcmath_number_create(zend_class_entry *ce)
812812
bcmath_number_obj_t *intern = zend_object_alloc(sizeof(bcmath_number_obj_t), ce);
813813

814814
zend_object_std_init(&intern->std, ce);
815+
object_properties_init(&intern->std, ce);
815816

816817
intern->num = NULL;
817818
intern->value = NULL;
@@ -820,9 +821,9 @@ static zend_object *bcmath_number_create(zend_class_entry *ce)
820821
return &intern->std;
821822
}
822823

823-
static void bcmath_number_free(zend_object *object)
824+
static void bcmath_number_free(zend_object *obj)
824825
{
825-
bcmath_number_obj_t *intern = get_bcmath_number_from_obj(object);
826+
bcmath_number_obj_t *intern = get_bcmath_number_from_obj(obj);
826827
if (intern->num) {
827828
bc_free_num(&intern->num);
828829
intern->num = NULL;
@@ -834,9 +835,9 @@ static void bcmath_number_free(zend_object *object)
834835
zend_object_std_dtor(&intern->std);
835836
}
836837

837-
static zend_object *bcmath_number_clone(zend_object *object)
838+
static zend_object *bcmath_number_clone(zend_object *obj)
838839
{
839-
bcmath_number_obj_t *original = get_bcmath_number_from_obj(object);
840+
bcmath_number_obj_t *original = get_bcmath_number_from_obj(obj);
840841
bcmath_number_obj_t *clone = get_bcmath_number_from_obj(bcmath_number_create(bcmath_number_ce));
841842

842843
clone->num = bc_copy_num(original->num);

ext/bcmath/bcmath.stub.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,10 @@ function bcround(string $num, int $precision = 0, int $mode = PHP_ROUND_HALF_UP)
4242
}
4343

4444
namespace BcMath {
45-
/**
46-
* @property string $value
47-
* @property int $scale
48-
*/
4945
final readonly class Number implements \Stringable {
46+
public string $value;
47+
public int $scale;
48+
5049
public function __construct(string|int $num) {}
5150

5251
public function add(Number|string|int $num, ?int $scale = null): Number {}

ext/bcmath/bcmath_arginfo.h

Lines changed: 13 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)