September 30th, 2013, 02:21 PM
In an extension, I am trying to read and write properties of $this. Especially, storing a resource - which is actualy a pointer to a c++ class instance.
I know the function definition is:
but what is a zend_bool? I tried calling it like this:
ZEND_API zval *zend_read_property(zend_class_entry *scope, zval *object, const char *name, int name_length, zend_bool silent TSRMLS_DC);
But at the line which says FALSE, g++ is telling me the argument is invaild?
zval prop = zend_read_property(
Any help here? o-o
/Users/Ingwie/Work/php-ext/php-ewsc/php_easywsclient.cpp: In function ‘void zim_easywsclient_readyState(int, zval*, zval**, zval*, int, void***)’:
/Users/Ingwie/Work/php-ext/php-ewsc/php_easywsclient.cpp:126: error: conversion from ‘zval*’ to non-scalar type ‘_zval_struct’ requested
September 30th, 2013, 02:51 PM
Generally, PHP programmers don't write in the C++ core of PHP. Moving your thread to C/C++
Also, resource types can't be serialized or stored in any way, they have to be in active memory.
HEY! YOU! Read the New User Guide and Forum Rules
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin
"The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002
Think we're being rude? Maybe you asked a bad question
or you're a Help Vampire.
Trying to argue intelligently? Please read this.
September 30th, 2013, 02:55 PM
zend_bool is an unsigned char. Try just passing 1.