php_gtk_parse_args problems
| From: | Arx Cruz | Date: | Tue, 13 Mar 2007 19:25:41 +0000 |
| Subject: | php_gtk_parse_args problems | ||
| Groups: | php.gtk.dev | ||
| Request: | Send a blank email to php-gtk-dev+get-3778@lists.php.net to get a copy of this message | ||
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"