I've created a new module, which is an improvement to the socket library. I
however do not plan on re-writing every single function. So I need to find a
way to somehow access the socket library's resources. My question is, is
there a way to access another module's resource?
--
PHP Internals - PHP
n your extension?
--Wez.
On 9/11/05, RG <[EMAIL PROTECTED]> wrote:
> I've created a new module, which is an improvement to the socket library.
I
> however do not plan on re-writing every single function. So I need to find
a
> way to somehow access the socket library's resou
Yeah I have seen those functions, but they are quite bloated in my opnion.
Is there any way of getting the resource id without modifying sockets?
"Wez Furlong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
On 9/11/05, RG <[EMAIL PROTECTED]> wrote:
>
wow thanks, I'm gonna go and try it out right now and tell you my results
""Sara Golemon"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > static int le_socket = -1;
> >
> Scratch that, those instances of -1 should have been 0
> (Which is what zend_fetch_list_dtor_id() returns a
Yep, that did work, thanks a lot
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
n your extension?
--Wez.
On 9/11/05, RG <[EMAIL PROTECTED]> wrote:
> I've created a new module, which is an improvement to the socket library.
I
> however do not plan on re-writing every single function. So I need to find
a
> way to somehow access the socket library's resou
This is quite unusual, for some reason PHP segfaults after I call my
function. The function deals with Resources from another module, it works,
that's not the problem. The functions works exactly as anticipated, however
if I call that function again or if I call die or exit PHP segfaults.
Any ideas
The following code segfaults after either I call die/exit or call
socketi_accept once again.
Can anyone spot anything working with it?
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "php_hello.h"
#include
#include
#include
#include
#include
#include
#include
#def
For some reason I can't malloc php_socket structs, and that's not where it
segfaults. The function works perfectly once. Then if I attempt to exit /
die or call that function again, it dies.
""Sara Golemon"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > new_sock->bsd_socket = acc
That's not where it segfaults. The function works perfectly once. If I
attempt to exit /
die or call that function again, it segfaults.
However, I have noticed that if I do not use ZEND_REGISTER_RESOURCE the
program no longer segfaults.
And sorry for the comments, someone people don't write the fin
Well I did try to use it in RINIT, but PHP just wasn't RINIT so I
figured why not put it in MINIT
""Sara Golemon"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > That's not where it segfaults. The function works perfectly once. If I
> > attempt to exit /
> > die or call that f
Well I did try to use it in RINIT, but PHP just wasn't RINIT so I
figured why not put it in MINIT. And I solved the problem, I guess I should
have been more careful when reading the PHP API tutorials, I used malloc
instead of emalloc, so malloc was causing gcc to miscalculate its size or
make i
> both claims above don't make *any* sense to me, making me think
> you still really do not know what you are doing :(
O_O, wow, sorry...
I did not write that like that..
What I meant to say was that I did use zend_fetch_list_dtor_id in RINIT at
first, but I noticed that PHP was not calling RI
13 matches
Mail list logo