ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-gtk-dev
php-gtk-dev
[PHP-GTK-DEV] php_gtk_parse_args doubt
by Arx Cruz other posts by this author
Mar 12 2007 11:32AM messages near this date
Re: [PHP-GTK-DEV] php_gtk_parse_args problems | [PHP-GTK-DEV] 1
Hello all,

First all, this is my first post here, and sorry my english.

I've trying to make a binding of VteTerminal to php-gtk2.

Untill now things works pretty good, i could be able to create
vte.defs config.m4, Makefile.frag, i'm able to generate gen_vte.c.
But...
some methods couldnt be parsed to gen_vte.c and i must make it myself
with vte.overrides.

vte_terminal_fork_command is the method i want to override, since
parse dont work.

the sign of this method is:

pid_t       vte_terminal_fork_command       (VteTerminal *terminal,
                                             const char *command,
                                             char **argv,
                                             char **envv,
                                             const char *directory,
                                             gboolean lastlog,
                                             gboolean utmp,
                                             gboolean wtmp);

so i put in vte.overrides this code:

override vte_terminal_fork_command
PHP_METHOD
{
     const char *directory, *command;
     if(!php_gtk_parse_args(ZEND_NUM_ARGS(), "uu", &command, &directory)) {
          return;
     }

     vte_terminal_fork_command(VTE_TERMINAL(PHPG_OBJECT(this_ptr)),
(const char*)command, NULL, g_listenf(), (const char*)directory,
FALSE, FALSE, FALSE);
}

all compile fine, but when i try to use
VteTerminal-> fork_command("directory", "command");
I got a error like this:

phpg_register_enum: assertion `g_type_is_a(gtype, ((GType) ((12) <<
(2))))´ failed
then a segment fault.

I wonder how workis this php_gtk_parse_args (what's mean uu, s, a and
so on) if someone could help me, i'll be thankfull and php-gtk will
will a new binding :)

Cheers!

Arx Cruz


-- 
"A fé remove montanhas, mas eu prefiro a dinamite"

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved