[PECL-CVS] [pecl-web_services-oauth] master: Merge pull request #42 from pavetheway91/fix_php86
[email protected] (Rasmus Lerdorf via GitHub) Wed, 17 Jun 2026 13:10:21 +0000
| Newsgroups | php.pecl.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Rasmus Lerdorf (rlerdorf)
Committer: GitHub (web-flow)
Pusher: rlerdorf
Date: 2026-06-17T09:10:11-04:00
Commit: https://github.com/php/pecl-web_services-oauth/commit/5fe50210cc97853ceeff23537b979fe490d0d077
Raw diff: https://github.com/php/pecl-web_services-oauth/commit/5fe50210cc97853ceeff23537b979fe490d0d077.diff
Merge pull request #42 from pavetheway91/fix_php86
fix build on PHP 8.6+
Changed paths:
M oauth.c
M php_oauth.h
M provider.c
M provider.h
Diff:
diff --git a/oauth.c b/oauth.c
index f05a95b..0a61b05 100644
--- a/oauth.c
+++ b/oauth.c
@@ -2913,7 +2913,7 @@ PHP_MINIT_FUNCTION(oauth)
zend_string_release(attribute_name_AllowDynamicProperties_class_OAuth);
#endif
memcpy(&so_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
- so_object_handlers.offset = XtOffsetOf(php_so_object, zo);
+ so_object_handlers.offset = offsetof(php_so_object, zo);
so_object_handlers.read_property = oauth_read_member;
so_object_handlers.write_property = oauth_write_member;
diff --git a/php_oauth.h b/php_oauth.h
index 4442388..4d4310d 100644
--- a/php_oauth.h
+++ b/php_oauth.h
@@ -259,7 +259,7 @@ typedef struct {
} php_so_object;
static inline php_so_object *so_object_from_obj(zend_object *obj) /* {{{ */ {
- return (php_so_object*)((char*)(obj) - XtOffsetOf(php_so_object, zo));
+ return (php_so_object*)((char*)(obj) - offsetof(php_so_object, zo));
}
/* }}} */
diff --git a/provider.c b/provider.c
index 295af02..4717cfc 100644
--- a/provider.c
+++ b/provider.c
@@ -1238,7 +1238,7 @@ extern int oauth_provider_register_class(void) /* {{{ */
#endif
memcpy(&oauth_provider_obj_hndlrs, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
- oauth_provider_obj_hndlrs.offset = XtOffsetOf(php_oauth_provider, zo);
+ oauth_provider_obj_hndlrs.offset = offsetof(php_oauth_provider, zo);
oauth_provider_obj_hndlrs.free_obj = oauth_provider_free_storage;
return SUCCESS;
diff --git a/provider.h b/provider.h
index f4d7e2e..5b83d75 100644
--- a/provider.h
+++ b/provider.h
@@ -108,7 +108,7 @@ typedef struct {
} php_oauth_provider;
static inline php_oauth_provider *sop_object_from_obj(zend_object *obj) /* {{{ */ {
- return (php_oauth_provider*)((char*)(obj) - XtOffsetOf(php_oauth_provider, zo));
+ return (php_oauth_provider*)((char*)(obj) - offsetof(php_oauth_provider, zo));
}
/* }}} */