Re: [PHP-DEV] Extension help

2001-03-20 Thread Sterling Hughes
On Tue, 20 Mar 2001, Barry Mitchelson wrote: > ok, I have managed to add a member variable, but am having problems when i try to >retreive it using zend_find_hash > > here's the code : > > for the extension : > > PHP_FUNCTION(create_object) > { > > ... other stuff > > add_proper

Re: [PHP-DEV] Extension help

2001-03-20 Thread Barry Mitchelson
On Tue, Mar 20, 2001 at 06:48:39PM +0200, Stanislav Malyshev wrote: > BM>> is there full documentation of the Zend API - i found the stuff > BM>> on the zend website to be useful, but didn't cover everything. > > Well, that's the most full one that exists. Eventually, it should be > extended to c

Re: [PHP-DEV] Extension help && mailing list???

2001-03-20 Thread Stanislav Malyshev
MB>> > If there is, I couldn't find it either. The docs are at http://www.zend.com/apidoc/ -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ +972-3-6139665 ext.115 -- PHP Development Mailing List To unsubscribe, e-mail: [EMAIL PROTEC

Re: [PHP-DEV] Extension help

2001-03-20 Thread Stanislav Malyshev
BM>> is there full documentation of the Zend API - i found the stuff BM>> on the zend website to be useful, but didn't cover everything. Well, that's the most full one that exists. Eventually, it should be extended to cover the most, but before it happnes, you have the code and the PHP-DEV... --

Re: [PHP-DEV] Extension help

2001-03-20 Thread Barry Mitchelson
On Tue, Mar 20, 2001 at 05:15:58PM +0100, Marc Boeren wrote: > > >BTW, (*tmpString)->value.str.val == Z_STRVAL_PP(tmpString) but the > >latter looks much nicer :) > > Granted, but that's what happens if you just examine the code and don't read > the documentation :-) is there full documentation

[PHP-DEV] Extension help && mailing list???

2001-03-20 Thread Marc Boeren
> >is there full documentation of the Zend API - i found the stuff on the > zend website to be useful, but didn't cover everything. > > If there is, I couldn't find it either. > So it's that and the source code itself. > > If anyone knows about more documentation, could someone put it up (or

RE: [PHP-DEV] Extension help

2001-03-20 Thread Marc Boeren
>BTW, (*tmpString)->value.str.val == Z_STRVAL_PP(tmpString) but the >latter looks much nicer :) Granted, but that's what happens if you just examine the code and don't read the documentation :-) Cheerio, Marc. -- PHP Development Mailing List To unsubscribe, e-mail: [EMAI

Re: [PHP-DEV] Extension help

2001-03-20 Thread Stanislav Malyshev
BM>> > but I may be wrong on the level of indirection. BM>> > The zval cannot automagically be put in a %s and treated as a string, you BM>> > should manually extract the pointer to the actual string. BM>> BM>> even though i did convert_to_string_ex(tmpString) ? The convert_to_string_ex makes tmp

Re: [PHP-DEV] Extension help

2001-03-20 Thread Andrei Zmievski
On Tue, 20 Mar 2001, Stanislav Malyshev wrote: > MB>> zend_printf("foo = %s", (*tmpString)->value.str.val); > > BTW, (*tmpString)->value.str.val == Z_STRVAL_PP(tmpString) but the > latter looks much nicer :) And much like Perl but not quite that bad yet.. :)) -Andrei * Life may be expensive, bu

RE: [PHP-DEV] Extension help

2001-03-20 Thread Stanislav Malyshev
MB>> zend_printf("foo = %s", (*tmpString)->value.str.val); BTW, (*tmpString)->value.str.val == Z_STRVAL_PP(tmpString) but the latter looks much nicer :) -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ +972-3-6139665 ext.115 -- PHP Development Mailing Li

RE: [PHP-DEV] Extension help

2001-03-20 Thread Marc Boeren
> Hi! > > >even though i did convert_to_string_ex(tmpString) ? > You should still do that, but the only thing that really does is set the zval type to IS_STRING, and the value union is set accordingly (instead of e.g. a long in value.lval, you get the value as a string in value.str.val (and the

Re: [PHP-DEV] Extension help

2001-03-20 Thread Barry Mitchelson
On Tue, Mar 20, 2001 at 03:59:29PM +0100, Marc Boeren wrote: > > >> You're almost correct, sizeof("foo") should be sizeof("foo")+1 > > >hmm... still not working :( > > My fault for not reading on beyond the first typo: > > >zend_printf("foo = %s",tmpString); > > should probably be > > zend_p

RE: [PHP-DEV] Extension help

2001-03-20 Thread Marc Boeren
>> You're almost correct, sizeof("foo") should be sizeof("foo")+1 >hmm... still not working :( My fault for not reading on beyond the first typo: >zend_printf("foo = %s",tmpString); should probably be zend_printf("foo = %s", (*tmpString)->value.str.val); but I may be wrong on the level of i

Re: [PHP-DEV] Extension help

2001-03-20 Thread Barry Mitchelson
On Tue, Mar 20, 2001 at 03:24:00PM +0100, Marc Boeren wrote: > > > >zend_hash_find(obj->value.obj.properties,"foo",sizeof("foo"),(void**)&tmpSt > ring); > > You're almost correct, sizeof("foo") should be sizeof("foo")+1 hmm... still not working :( > > Cheerio, Marc. > > -- > PHP Developmen

RE: [PHP-DEV] Extension help

2001-03-20 Thread Marc Boeren
>zend_hash_find(obj->value.obj.properties,"foo",sizeof("foo"),(void**)&tmpSt ring); You're almost correct, sizeof("foo") should be sizeof("foo")+1 Cheerio, Marc. -- PHP Development Mailing List To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [

Re: [PHP-DEV] Extension help

2001-03-20 Thread Barry Mitchelson
ok, I have managed to add a member variable, but am having problems when i try to retreive it using zend_find_hash here's the code : for the extension : PHP_FUNCTION(create_object) { ... other stuff add_property_string(return_value,"foo","hello!",1); ... other stuff

Re: [PHP-DEV] Extension help

2001-03-19 Thread Sterling Hughes
On Mon, 19 Mar 2001, Barry Mitchelson wrote: > hey, > > I'm writing an extension which defines a class. In the constructor, I'd like to >create a member variable which I can then access with the other member functions in >my extension. > > In php it would be like : > > class foo > { > >

[PHP-DEV] Extension help

2001-03-19 Thread Barry Mitchelson
hey, I'm writing an extension which defines a class. In the constructor, I'd like to create a member variable which I can then access with the other member functions in my extension. In php it would be like : class foo { var $m_bar; function foo() {