summaryrefslogtreecommitdiff
path: root/ext/snmp/php_snmp.h
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2014-05-20 14:51:16 +0300
committerAndrey Hristov <andrey@php.net>2014-05-20 14:51:16 +0300
commit759f1009ad1d554c59fb9a6ef2407342c53b00b3 (patch)
treeef9ed58729d5e328b28ffea2ff254310db72408e /ext/snmp/php_snmp.h
parent90cad3de2f4a4969d56ada43791e40ab64208ed9 (diff)
parent01ef592fba325cd28ff3f1d28f23f1cea633eb01 (diff)
downloadphp-git-759f1009ad1d554c59fb9a6ef2407342c53b00b3.tar.gz
Merge branch 'phpng' of git.php.net:php-src into phpng
Diffstat (limited to 'ext/snmp/php_snmp.h')
-rw-r--r--ext/snmp/php_snmp.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/snmp/php_snmp.h b/ext/snmp/php_snmp.h
index 09ab8b9e81..50bd272204 100644
--- a/ext/snmp/php_snmp.h
+++ b/ext/snmp/php_snmp.h
@@ -85,7 +85,6 @@ PHP_METHOD(SNMP, getErrno);
PHP_METHOD(SNMP, getError);
typedef struct _php_snmp_object {
- zend_object zo;
struct snmp_session *session;
int max_oids;
int valueretrieval;
@@ -96,10 +95,16 @@ typedef struct _php_snmp_object {
int oid_increasing_check;
int exceptions_enabled;
char snmp_errstr[256];
+ zend_object zo;
} php_snmp_object;
+static inline php_snmp_object *php_snmp_fetch_object(zend_object *obj) {
+ return (php_snmp_object *)((char*)(obj) - XtOffsetOf(php_snmp_object, zo));
+}
+
+#define Z_SNMP_P(zv) php_snmp_fetch_object(Z_OBJ_P((zv)))
-typedef int (*php_snmp_read_t)(php_snmp_object *snmp_object, zval **retval TSRMLS_DC);
+typedef int (*php_snmp_read_t)(php_snmp_object *snmp_object, zval *retval TSRMLS_DC);
typedef int (*php_snmp_write_t)(php_snmp_object *snmp_object, zval *newval TSRMLS_DC);
typedef struct _ptp_snmp_prop_handler {