Skip to content

Commit

Permalink
revert unwanted changes to php ext
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer committed Nov 28, 2024
1 parent 4595473 commit 30be71e
Showing 1 changed file with 124 additions and 124 deletions.
248 changes: 124 additions & 124 deletions php/ext/google/protobuf/wkt.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ static void google_protobuf_empty_proto_AddDescriptor();
static void google_protobuf_field_mask_proto_AddDescriptor();
static void google_protobuf_source_context_proto_AddDescriptor();
static void google_protobuf_struct_proto_AddDescriptor();
static void google_protobuf_type_proto_AddDescriptor();
static void google_protobuf_timestamp_proto_AddDescriptor();
static void google_protobuf_type_proto_AddDescriptor();
static void google_protobuf_wrappers_proto_AddDescriptor();
/* google/protobuf/any.proto */

Expand Down Expand Up @@ -1497,6 +1497,127 @@ static void google_protobuf_NullValue_ModuleInit() {
strlen("NULL_VALUE"), 0);
}

/* google/protobuf/timestamp.proto */

zend_class_entry* GPBMetadata_Google_Protobuf_Timestamp_ce;

const char google_protobuf_timestamp_proto_descriptor [239] = {
'\n', '\037', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'i', 'm', 'e', 's', 't', 'a',
'm', 'p', '.', 'p', 'r', 'o', 't', 'o', '\022', '\017', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f',
'\"', '+', '\n', '\t', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', '\022', '\017', '\n', '\007', 's', 'e', 'c', 'o', 'n', 'd', 's', '\030',
'\001', ' ', '\001', '(', '\003', '\022', '\r', '\n', '\005', 'n', 'a', 'n', 'o', 's', '\030', '\002', ' ', '\001', '(', '\005', 'B', '\205', '\001', '\n', '\023',
'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', 'B', '\016', 'T', 'i', 'm', 'e',
's', 't', 'a', 'm', 'p', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', '2', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o', 'l', 'a',
'n', 'g', '.', 'o', 'r', 'g', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'y', 'p', 'e', 's', '/', 'k', 'n', 'o',
'w', 'n', '/', 't', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'p', 'b', '\370', '\001', '\001', '\242', '\002', '\003', 'G', 'P', 'B', '\252', '\002',
'\036', 'G', 'o', 'o', 'g', 'l', 'e', '.', 'P', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'W', 'e', 'l', 'l', 'K', 'n', 'o', 'w',
'n', 'T', 'y', 'p', 'e', 's', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
};

static void google_protobuf_timestamp_proto_AddDescriptor() {
if (DescriptorPool_HasFile("google/protobuf/timestamp.proto")) return;
DescriptorPool_AddDescriptor("google/protobuf/timestamp.proto", google_protobuf_timestamp_proto_descriptor,
sizeof(google_protobuf_timestamp_proto_descriptor));
}

static PHP_METHOD(GPBMetadata_Google_Protobuf_Timestamp, initOnce) {
google_protobuf_timestamp_proto_AddDescriptor();
}

static zend_function_entry GPBMetadata_Google_Protobuf_Timestamp_methods[] = {
PHP_ME(GPBMetadata_Google_Protobuf_Timestamp, initOnce, arginfo_void, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
ZEND_FE_END
};

static void GPBMetadata_Google_Protobuf_Timestamp_ModuleInit() {
zend_class_entry tmp_ce;

INIT_CLASS_ENTRY(tmp_ce, "GPBMetadata\\Google\\Protobuf\\Timestamp",
GPBMetadata_Google_Protobuf_Timestamp_methods);

GPBMetadata_Google_Protobuf_Timestamp_ce = zend_register_internal_class(&tmp_ce);
}

/* google_protobuf_Timestamp */

zend_class_entry* google_protobuf_Timestamp_ce;

static PHP_METHOD(google_protobuf_Timestamp, __construct) {
google_protobuf_timestamp_proto_AddDescriptor();
zim_Message___construct(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}

static PHP_METHOD(google_protobuf_Timestamp, getSeconds) {
Message* intern = (Message*)Z_OBJ_P(getThis());
const upb_FieldDef *f = upb_MessageDef_FindFieldByName(
intern->desc->msgdef, "seconds");
zval ret;
Message_get(intern, f, &ret);
RETURN_COPY_VALUE(&ret);
}

static PHP_METHOD(google_protobuf_Timestamp, setSeconds) {
Message* intern = (Message*)Z_OBJ_P(getThis());
const upb_FieldDef *f = upb_MessageDef_FindFieldByName(
intern->desc->msgdef, "seconds");
zval *val;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &val)
== FAILURE) {
return;
}
Message_set(intern, f, val);
RETURN_COPY(getThis());
}

static PHP_METHOD(google_protobuf_Timestamp, getNanos) {
Message* intern = (Message*)Z_OBJ_P(getThis());
const upb_FieldDef *f = upb_MessageDef_FindFieldByName(
intern->desc->msgdef, "nanos");
zval ret;
Message_get(intern, f, &ret);
RETURN_COPY_VALUE(&ret);
}

static PHP_METHOD(google_protobuf_Timestamp, setNanos) {
Message* intern = (Message*)Z_OBJ_P(getThis());
const upb_FieldDef *f = upb_MessageDef_FindFieldByName(
intern->desc->msgdef, "nanos");
zval *val;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &val)
== FAILURE) {
return;
}
Message_set(intern, f, val);
RETURN_COPY(getThis());
}

ZEND_BEGIN_ARG_INFO_EX(arginfo_timestamp_fromdatetime, 0, 0, 1)
ZEND_ARG_INFO(0, datetime)
ZEND_END_ARG_INFO()

static zend_function_entry google_protobuf_Timestamp_phpmethods[] = {
PHP_ME(google_protobuf_Timestamp, __construct, arginfo_construct, ZEND_ACC_PUBLIC)
PHP_ME(google_protobuf_Timestamp, getSeconds, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(google_protobuf_Timestamp, setSeconds, arginfo_setter, ZEND_ACC_PUBLIC)
PHP_ME(google_protobuf_Timestamp, getNanos, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(google_protobuf_Timestamp, setNanos, arginfo_setter, ZEND_ACC_PUBLIC)
PHP_ME(google_protobuf_Timestamp, fromDateTime, arginfo_timestamp_fromdatetime, ZEND_ACC_PUBLIC)
PHP_ME(google_protobuf_Timestamp, toDateTime, arginfo_void, ZEND_ACC_PUBLIC)
ZEND_FE_END
};

static void google_protobuf_Timestamp_ModuleInit() {
zend_class_entry tmp_ce;

INIT_CLASS_ENTRY(tmp_ce, "Google\\Protobuf\\Timestamp",
google_protobuf_Timestamp_phpmethods);

google_protobuf_Timestamp_ce = zend_register_internal_class(&tmp_ce);
google_protobuf_Timestamp_ce->ce_flags |= ZEND_ACC_FINAL;
google_protobuf_Timestamp_ce->create_object = Message_create;
zend_do_inheritance(google_protobuf_Timestamp_ce, message_ce);
}

/* google/protobuf/type.proto */

zend_class_entry* GPBMetadata_Google_Protobuf_Type_ce;
Expand Down Expand Up @@ -2636,127 +2757,6 @@ static void google_protobuf_Syntax_ModuleInit() {
strlen("SYNTAX_EDITIONS"), 2);
}

/* google/protobuf/timestamp.proto */

zend_class_entry* GPBMetadata_Google_Protobuf_Timestamp_ce;

const char google_protobuf_timestamp_proto_descriptor [239] = {
'\n', '\037', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'i', 'm', 'e', 's', 't', 'a',
'm', 'p', '.', 'p', 'r', 'o', 't', 'o', '\022', '\017', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f',
'\"', '+', '\n', '\t', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', '\022', '\017', '\n', '\007', 's', 'e', 'c', 'o', 'n', 'd', 's', '\030',
'\001', ' ', '\001', '(', '\003', '\022', '\r', '\n', '\005', 'n', 'a', 'n', 'o', 's', '\030', '\002', ' ', '\001', '(', '\005', 'B', '\205', '\001', '\n', '\023',
'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', 'B', '\016', 'T', 'i', 'm', 'e',
's', 't', 'a', 'm', 'p', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', '2', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o', 'l', 'a',
'n', 'g', '.', 'o', 'r', 'g', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'y', 'p', 'e', 's', '/', 'k', 'n', 'o',
'w', 'n', '/', 't', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'p', 'b', '\370', '\001', '\001', '\242', '\002', '\003', 'G', 'P', 'B', '\252', '\002',
'\036', 'G', 'o', 'o', 'g', 'l', 'e', '.', 'P', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'W', 'e', 'l', 'l', 'K', 'n', 'o', 'w',
'n', 'T', 'y', 'p', 'e', 's', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
};

static void google_protobuf_timestamp_proto_AddDescriptor() {
if (DescriptorPool_HasFile("google/protobuf/timestamp.proto")) return;
DescriptorPool_AddDescriptor("google/protobuf/timestamp.proto", google_protobuf_timestamp_proto_descriptor,
sizeof(google_protobuf_timestamp_proto_descriptor));
}

static PHP_METHOD(GPBMetadata_Google_Protobuf_Timestamp, initOnce) {
google_protobuf_timestamp_proto_AddDescriptor();
}

static zend_function_entry GPBMetadata_Google_Protobuf_Timestamp_methods[] = {
PHP_ME(GPBMetadata_Google_Protobuf_Timestamp, initOnce, arginfo_void, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
ZEND_FE_END
};

static void GPBMetadata_Google_Protobuf_Timestamp_ModuleInit() {
zend_class_entry tmp_ce;

INIT_CLASS_ENTRY(tmp_ce, "GPBMetadata\\Google\\Protobuf\\Timestamp",
GPBMetadata_Google_Protobuf_Timestamp_methods);

GPBMetadata_Google_Protobuf_Timestamp_ce = zend_register_internal_class(&tmp_ce);
}

/* google_protobuf_Timestamp */

zend_class_entry* google_protobuf_Timestamp_ce;

static PHP_METHOD(google_protobuf_Timestamp, __construct) {
google_protobuf_timestamp_proto_AddDescriptor();
zim_Message___construct(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}

static PHP_METHOD(google_protobuf_Timestamp, getSeconds) {
Message* intern = (Message*)Z_OBJ_P(getThis());
const upb_FieldDef *f = upb_MessageDef_FindFieldByName(
intern->desc->msgdef, "seconds");
zval ret;
Message_get(intern, f, &ret);
RETURN_COPY_VALUE(&ret);
}

static PHP_METHOD(google_protobuf_Timestamp, setSeconds) {
Message* intern = (Message*)Z_OBJ_P(getThis());
const upb_FieldDef *f = upb_MessageDef_FindFieldByName(
intern->desc->msgdef, "seconds");
zval *val;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &val)
== FAILURE) {
return;
}
Message_set(intern, f, val);
RETURN_COPY(getThis());
}

static PHP_METHOD(google_protobuf_Timestamp, getNanos) {
Message* intern = (Message*)Z_OBJ_P(getThis());
const upb_FieldDef *f = upb_MessageDef_FindFieldByName(
intern->desc->msgdef, "nanos");
zval ret;
Message_get(intern, f, &ret);
RETURN_COPY_VALUE(&ret);
}

static PHP_METHOD(google_protobuf_Timestamp, setNanos) {
Message* intern = (Message*)Z_OBJ_P(getThis());
const upb_FieldDef *f = upb_MessageDef_FindFieldByName(
intern->desc->msgdef, "nanos");
zval *val;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &val)
== FAILURE) {
return;
}
Message_set(intern, f, val);
RETURN_COPY(getThis());
}

ZEND_BEGIN_ARG_INFO_EX(arginfo_timestamp_fromdatetime, 0, 0, 1)
ZEND_ARG_INFO(0, datetime)
ZEND_END_ARG_INFO()

static zend_function_entry google_protobuf_Timestamp_phpmethods[] = {
PHP_ME(google_protobuf_Timestamp, __construct, arginfo_construct, ZEND_ACC_PUBLIC)
PHP_ME(google_protobuf_Timestamp, getSeconds, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(google_protobuf_Timestamp, setSeconds, arginfo_setter, ZEND_ACC_PUBLIC)
PHP_ME(google_protobuf_Timestamp, getNanos, arginfo_void, ZEND_ACC_PUBLIC)
PHP_ME(google_protobuf_Timestamp, setNanos, arginfo_setter, ZEND_ACC_PUBLIC)
PHP_ME(google_protobuf_Timestamp, fromDateTime, arginfo_timestamp_fromdatetime, ZEND_ACC_PUBLIC)
PHP_ME(google_protobuf_Timestamp, toDateTime, arginfo_void, ZEND_ACC_PUBLIC)
ZEND_FE_END
};

static void google_protobuf_Timestamp_ModuleInit() {
zend_class_entry tmp_ce;

INIT_CLASS_ENTRY(tmp_ce, "Google\\Protobuf\\Timestamp",
google_protobuf_Timestamp_phpmethods);

google_protobuf_Timestamp_ce = zend_register_internal_class(&tmp_ce);
google_protobuf_Timestamp_ce->ce_flags |= ZEND_ACC_FINAL;
google_protobuf_Timestamp_ce->create_object = Message_create;
zend_do_inheritance(google_protobuf_Timestamp_ce, message_ce);
}

/* google/protobuf/wrappers.proto */

zend_class_entry* GPBMetadata_Google_Protobuf_Wrappers_ce;
Expand Down Expand Up @@ -3278,6 +3278,8 @@ static void WellKnownTypes_ModuleInit() {
google_protobuf_Value_ModuleInit();
google_protobuf_ListValue_ModuleInit();
google_protobuf_NullValue_ModuleInit();
GPBMetadata_Google_Protobuf_Timestamp_ModuleInit();
google_protobuf_Timestamp_ModuleInit();
GPBMetadata_Google_Protobuf_Type_ModuleInit();
google_protobuf_Type_ModuleInit();
google_protobuf_Field_ModuleInit();
Expand All @@ -3287,8 +3289,6 @@ static void WellKnownTypes_ModuleInit() {
google_protobuf_EnumValue_ModuleInit();
google_protobuf_Option_ModuleInit();
google_protobuf_Syntax_ModuleInit();
GPBMetadata_Google_Protobuf_Timestamp_ModuleInit();
google_protobuf_Timestamp_ModuleInit();
GPBMetadata_Google_Protobuf_Wrappers_ModuleInit();
google_protobuf_DoubleValue_ModuleInit();
google_protobuf_FloatValue_ModuleInit();
Expand Down

0 comments on commit 30be71e

Please sign in to comment.